mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 14:27:24 +00:00
delete empty options on poll creation
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
e77fb7cefb
commit
2ac1567f5d
@ -106,6 +106,8 @@ class PollCreateViewModel @Inject constructor(private val repository: PollReposi
|
||||
resultMode = 1
|
||||
}
|
||||
|
||||
_options.value = _options.value?.filter { it.pollOption.isNotEmpty() } as ArrayList<PollCreateOptionItem>
|
||||
|
||||
if (_question.isNotEmpty() && _options.value?.isNotEmpty() == true) {
|
||||
repository.createPoll(
|
||||
roomToken, _question, _options.value!!.map { it.pollOption }, resultMode,
|
||||
|
Loading…
Reference in New Issue
Block a user