From fff47b82435532465140dfee5e22f9d085de710f Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Mon, 15 Nov 2021 13:26:31 +0300 Subject: [PATCH] Lint fix. --- .../im/vector/app/features/poll/create/CreatePollFragment.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 {