From 84bcd0c273737571e185291c2a8dfbc862db34bb Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Tue, 27 Sep 2022 16:54:38 +0200 Subject: [PATCH] hide end poll button for edit poll mode Signed-off-by: Marcel Hibbe --- .../com/nextcloud/talk/polls/viewmodels/PollMainViewModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/nextcloud/talk/polls/viewmodels/PollMainViewModel.kt b/app/src/main/java/com/nextcloud/talk/polls/viewmodels/PollMainViewModel.kt index da8977e56..32f0152d7 100644 --- a/app/src/main/java/com/nextcloud/talk/polls/viewmodels/PollMainViewModel.kt +++ b/app/src/main/java/com/nextcloud/talk/polls/viewmodels/PollMainViewModel.kt @@ -153,7 +153,7 @@ class PollMainViewModel @Inject constructor(private val repository: PollReposito } private fun showEndPollButton(poll: Poll): Boolean { - return poll.status == Poll.STATUS_OPEN && (isPollCreatedByCurrentUser(poll) || isOwnerOrModerator) + return !editVotes && poll.status == Poll.STATUS_OPEN && (isPollCreatedByCurrentUser(poll) || isOwnerOrModerator) } private fun showVotersAmount(poll: Poll): Boolean {