mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-28 09:38:14 +03:00
delete empty options on poll creation
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
e77fb7cefb
commit
2ac1567f5d
1 changed files with 2 additions and 0 deletions
|
@ -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 a new issue