diff --git a/app/src/main/java/com/nextcloud/talk/polls/viewmodels/PollCreateViewModel.kt b/app/src/main/java/com/nextcloud/talk/polls/viewmodels/PollCreateViewModel.kt index abbfdd920..fcb38635c 100644 --- a/app/src/main/java/com/nextcloud/talk/polls/viewmodels/PollCreateViewModel.kt +++ b/app/src/main/java/com/nextcloud/talk/polls/viewmodels/PollCreateViewModel.kt @@ -106,6 +106,8 @@ class PollCreateViewModel @Inject constructor(private val repository: PollReposi resultMode = 1 } + _options.value = _options.value?.filter { it.pollOption.isNotEmpty() } as ArrayList + if (_question.isNotEmpty() && _options.value?.isNotEmpty() == true) { repository.createPoll( roomToken, _question, _options.value!!.map { it.pollOption }, resultMode,