diff --git a/vector/src/main/java/im/vector/app/features/poll/create/CreatePollFragment.kt b/vector/src/main/java/im/vector/app/features/poll/create/CreatePollFragment.kt index 7d7f0801e9..dc82579f15 100644 --- a/vector/src/main/java/im/vector/app/features/poll/create/CreatePollFragment.kt +++ b/vector/src/main/java/im/vector/app/features/poll/create/CreatePollFragment.kt @@ -61,8 +61,8 @@ class CreatePollFragment @Inject constructor( viewModel.handle(CreatePollAction.OnCreatePoll) } - viewModel.subscribe(this) { - views.createPollButton.isEnabled = it.canCreatePoll + viewModel.onEach(CreatePollViewState::canCreatePoll) { canCreatePoll -> + views.createPollButton.isEnabled = canCreatePoll } viewModel.observeViewEvents {