mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 15:38:28 +02:00
vector-im/element-ios/issues/5114 - Small answer option count limit code tweak.
This commit is contained in:
committed by
Stefan Ceriu
parent
d7e9fe61b4
commit
565c4e339d
@@ -81,13 +81,14 @@ struct PollEditFormAnswerOption: Identifiable, Equatable {
|
||||
}
|
||||
|
||||
struct PollEditFormViewState: BindableState {
|
||||
var minAnswerOptionsCount: Int
|
||||
var maxAnswerOptionsCount: Int
|
||||
var mode: PollEditFormMode
|
||||
var bindings: PollEditFormViewStateBindings
|
||||
|
||||
var confirmationButtonEnabled: Bool {
|
||||
!bindings.question.text.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty &&
|
||||
bindings.answerOptions.filter({ !$0.text.isEmpty }).count >= 2
|
||||
bindings.answerOptions.filter({ !$0.text.isEmpty }).count >= minAnswerOptionsCount
|
||||
}
|
||||
|
||||
var addAnswerOptionButtonEnabled: Bool {
|
||||
|
||||
Reference in New Issue
Block a user