mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 23:48:29 +02:00
vector-im/element-ios/issues/5114 - Polls in the timeline.
This commit is contained in:
@@ -21,6 +21,8 @@ import SwiftUI
|
||||
|
||||
enum PollEditFormStateAction {
|
||||
case viewAction(PollEditFormViewAction)
|
||||
case startLoading
|
||||
case stopLoading(Error?)
|
||||
}
|
||||
|
||||
enum PollEditFormViewAction {
|
||||
@@ -58,7 +60,7 @@ struct PollEditFormAnswerOption: Identifiable, Equatable {
|
||||
}
|
||||
|
||||
struct PollEditFormViewState: BindableState {
|
||||
let maxAnswerOptionsCount: Int
|
||||
var maxAnswerOptionsCount: Int
|
||||
var bindings: PollEditFormViewStateBindings
|
||||
|
||||
var confirmationButtonEnabled: Bool {
|
||||
@@ -69,9 +71,13 @@ struct PollEditFormViewState: BindableState {
|
||||
var addAnswerOptionButtonEnabled: Bool {
|
||||
bindings.answerOptions.count < maxAnswerOptionsCount
|
||||
}
|
||||
|
||||
var showLoadingIndicator: Bool = false
|
||||
}
|
||||
|
||||
struct PollEditFormViewStateBindings {
|
||||
var question: PollEditFormQuestion
|
||||
var answerOptions: [PollEditFormAnswerOption]
|
||||
|
||||
var showsFailureAlert: Bool = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user