Let pick-one answers carry notes from the Other box

This commit is contained in:
Ian Gulliver
2026-10-19 16:35:09 -07:00
parent 8bca7a4369
commit 5f61749e7b
8 changed files with 215 additions and 217 deletions
+3 -2
View File
@@ -134,7 +134,8 @@ private final class CardModel {
toggle(text, !checked.contains(text))
return
}
submit(InboxResponseCreate(itemId: item.id, _type: .option, options: [text]))
let notes = typed.isEmpty ? nil : store.drafts?.textAnswer(item.id)
submit(InboxResponseCreate(itemId: item.id, _type: .option, options: [text], text: notes), withImages: true)
}
func submit(_ response: InboxResponseCreate, withImages: Bool = false) {
@@ -485,7 +486,7 @@ private struct TextEntry: View {
.background(Palette.raised, in: RoundedRectangle(cornerRadius: 6))
.overlay(alignment: .topLeading) {
if text.wrappedValue.isEmpty {
Text("Your answer, a question back, or new instructions")
Text(model.multiple ? "Your answer, a question back, or new instructions" : "Your answer, or notes to send with a choice you click")
.foregroundStyle(Palette.muted)
.padding(.horizontal, 10)
.padding(.vertical, 6)