oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1import Foundation
2import Observation
3
4/// The person's edits belong to a card, including when its revision changes.
5@MainActor @Observable public final class QuestionAnswerDraft {
6 public var name: String
7 public var remembers = true
8 public var typedChoice = ""
9 init(card: ThinCard) { name = card.rememberName ?? "" }
10 public func submit(_ choice: String, card: ThinCard, session: EquipoSession) async -> EquipoSession.AnswerOutcome {
11 await session.answer(card, choice: choice, rememberName: card.rememberName == nil ? nil : (remembers ? name : ""))
12 }
13}
14