Forward current composer text to the new poll form to serve as the question/topic

This commit is contained in:
Stefan Ceriu
2026-05-22 13:01:22 +03:00
parent ac20ff0fc3
commit 77c5aba326
11 changed files with 26 additions and 21 deletions
@@ -22,8 +22,8 @@ struct PollFormScreenViewState: BindableState {
self.maxNumberOfOptions = maxNumberOfOptions
switch mode {
case .new:
bindings = .init()
case .new(let topic):
bindings = .init(question: topic ?? "")
case .edit(_, let poll):
bindings = .init(poll: poll)
}
@@ -71,7 +71,7 @@ struct PollFormScreenViewState: BindableState {
}
enum PollFormMode: Hashable {
case new
case new(topic: String?)
case edit(eventID: String, poll: Poll)
}