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 - Various tweaks following PR review.
This commit is contained in:
committed by
Stefan Ceriu
parent
bf6ef2bce2
commit
d7e9fe61b4
@@ -17,11 +17,20 @@
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
|
||||
struct PollDetails {
|
||||
let type: PollEditFormType
|
||||
enum EditFormPollType {
|
||||
case disclosed
|
||||
case undisclosed
|
||||
}
|
||||
|
||||
struct EditFormPollDetails {
|
||||
let type: EditFormPollType
|
||||
let question: String
|
||||
let answerOptions: [String]
|
||||
let maxSelections: UInt = 1
|
||||
|
||||
static var `default`: EditFormPollDetails {
|
||||
EditFormPollDetails(type: .disclosed, question: "", answerOptions: ["", ""])
|
||||
}
|
||||
}
|
||||
|
||||
enum PollEditFormMode {
|
||||
@@ -45,13 +54,8 @@ enum PollEditFormViewAction {
|
||||
|
||||
enum PollEditFormViewModelResult {
|
||||
case cancel
|
||||
case create(PollDetails)
|
||||
case update(PollDetails)
|
||||
}
|
||||
|
||||
enum PollEditFormType {
|
||||
case disclosed
|
||||
case undisclosed
|
||||
case create(EditFormPollDetails)
|
||||
case update(EditFormPollDetails)
|
||||
}
|
||||
|
||||
struct PollEditFormQuestion {
|
||||
@@ -96,7 +100,7 @@ struct PollEditFormViewState: BindableState {
|
||||
struct PollEditFormViewStateBindings {
|
||||
var question: PollEditFormQuestion
|
||||
var answerOptions: [PollEditFormAnswerOption]
|
||||
var type: PollEditFormType
|
||||
var type: EditFormPollType
|
||||
|
||||
var alertInfo: PollEditFormErrorAlertInfo?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user