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 - Added UI for creating undisclosed polls and logic for displaying them in the timeline.
This commit is contained in:
committed by
Stefan Ceriu
parent
3e3719d13a
commit
eff1d8c81c
@@ -20,10 +20,10 @@ import Foundation
|
||||
import SwiftUI
|
||||
|
||||
struct PollDetails {
|
||||
let type: PollEditFormType
|
||||
let question: String
|
||||
let answerOptions: [String]
|
||||
let maxSelections: UInt = 1
|
||||
let disclosed: Bool = true
|
||||
}
|
||||
|
||||
enum PollEditFormMode {
|
||||
@@ -51,6 +51,11 @@ enum PollEditFormViewModelResult {
|
||||
case update(PollDetails)
|
||||
}
|
||||
|
||||
enum PollEditFormType {
|
||||
case disclosed
|
||||
case undisclosed
|
||||
}
|
||||
|
||||
struct PollEditFormQuestion {
|
||||
var text: String {
|
||||
didSet {
|
||||
@@ -93,6 +98,7 @@ struct PollEditFormViewState: BindableState {
|
||||
struct PollEditFormViewStateBindings {
|
||||
var question: PollEditFormQuestion
|
||||
var answerOptions: [PollEditFormAnswerOption]
|
||||
var type: PollEditFormType
|
||||
|
||||
var alertInfo: PollEditFormErrorAlertInfo?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user