--- a/TalerWallet1/Views/OIM/OIMSubjectView.swift +++ b/TalerWallet1/Views/OIM/OIMSubjectView.swift @@ -64,6 +64,10 @@ @State private var amountVal: UInt64 = 0 @State private var sending = false // user tapped on Send @State private var appeared = false + // shuffled once per visit: `body` runs again whenever a goal is chosen or + // put back, and an order drawn there moved every picture each time + @State private var goals1 = ["blank", "Phone", "Electricity", "gasPump", "Hammer", "Water", "Kitchenware", "Cloth", "Medication"].shuffled() + @State private var goals2 = ["shopping", "Rent", "Schooling", "RepayLoan", "Medical", "Farming", "Bottle", "Paint", "GasCooker"].shuffled() func sendAction() { withAnimation(.basic1) { @@ -87,9 +91,6 @@ var body: some View { // let _ = Self._printChanges() let currency = cash.currency - let goals1 = ["blank", "Phone", "Electricity", "gasPump", "Hammer", "Water", "Kitchenware", "Cloth", "Medication"].shuffled() - let goals2 = ["shopping", "Rent", "Schooling", "RepayLoan", "Medical", "Farming", "Bottle", "Paint", "GasCooker"].shuffled() - let gotAction = (selectedGoal != nil) ? sendAction : nil OIMnavBack(stack: stack.push(), chest: currency.chest,