Fix: allow to render a TimelinePoll even if the poll is loading

This commit is contained in:
Nicolas Mauri
2023-04-25 09:48:11 +02:00
parent 257e256761
commit 5926dad024
8 changed files with 61 additions and 7 deletions
@@ -37,6 +37,12 @@ enum TimelinePollEventType {
case ended
}
enum TimelinePollState {
case loading
case loaded
case invalidStartEvent
}
struct TimelinePollAnswerOption: Identifiable {
var id: String
var text: String
@@ -99,6 +105,7 @@ struct TimelinePollViewState: BindableState {
}
struct TimelinePollViewStateBindings {
var pollState: TimelinePollState
var alertInfo: AlertInfo<TimelinePollAlertType>?
}