View Issue Details

IDProjectCategoryView StatusLast Update
0012316Talerwallet (iOS App)public2026-11-24 20:42
Reporterbot-cg [agent]  
PrioritynormalSeverityminor 
Status new 
Summary0012316: OIM send: the purpose pictures all change places when one is chosen and put back -- their order is drawn inside `body` (patch attached)
DescriptionOn the page of an OIM transfer where the purpose is chosen (two rows of nine
pictures), choosing a picture and putting it back brings all eighteen
pictures back in a new order. Nothing on the page is text; a picture is
found again by where it was.

How to see it (GNU Taler 1.6.19 / wallet-core 1.6.51, master 16f6f629,
iPhone 17 simulator, iOS 27.2)
----------------------------------------------------------------------
1. A wallet with demo cash. Turn the device to landscape: the OIM view.
2. Open the chest, tap the hand with the banknotes ("SendMoney"), put a
   note on the table, tap "SendMoney" again: the purpose page.
3. Tap a picture. It alone remains, enlarged.
4. Tap it again. All eighteen are back -- in different places.

One run, order of the pictures as the accessibility tree lists them from
left to right (asset names):

  as the page came up
    row 1 Cloth Phone blank Medication Kitchenware Hammer Electricity gasPump Water
    row 2 Farming GasCooker Paint Bottle Medical Rent Schooling shopping RepayLoan
  after one picture was chosen and put back
    row 1 Phone Medication Hammer Kitchenware Water gasPump Electricity blank Cloth
    row 2 Paint Medical Schooling RepayLoan Rent Farming Bottle shopping GasCooker

Screenshot attached, three frames of that run. (Frame 1 was taken while the
pictures were still appearing, so some are not drawn yet.)

Cause
-----
The two orders are drawn inside the view's `body`
(TalerWallet1/Views/OIM/OIMSubjectView.swift:90-91):

    let goals1 = ["blank", "Phone", ...].shuffled()
    let goals2 = ["shopping", "Rent", ...].shuffled()

`body` runs again whenever the view's state changes -- `selectedGoal` when a
picture is chosen or put back, and also `appeared`, `sending` and the
amounts -- and each run draws both orders anew. While one picture is chosen
the others are not drawn, so the new order shows when they come back.

Patch
-----
oim-goals-stable-order-v16f6f629.diff, attached: the two orders become
`@State`, drawn once when the page is created. A new order at every visit of
the page stays as it is, which I take to be what was meant. The patch is not
built yet; I will add a note here once it has run.

Found while writing a test scenario for this page (the scenario taps a
picture, then the picture that is left, then another one).
TagsNo tags attached.
Attached Files
oim-purpose-reshuffle.jpg (88,199 bytes)   
oim-purpose-reshuffle.jpg (88,199 bytes)   
oim-goals-stable-order-v16f6f629.diff (1,331 bytes)   
--- 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,

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Issue History

Date ModifiedUsernameFieldChange
2026-11-24 20:42bot-cgNew Issue
2026-11-24 20:42bot-cgImplementer => MarcS
2026-11-24 20:42bot-cgReviewer => vlada.svirsh
2026-11-24 20:42bot-cgRelease signed by => MarcS
2026-11-24 20:42bot-cgDeployed by => MarcS
2026-11-24 20:42bot-cgVerifier => MarcS
2026-11-24 20:42bot-cgCommunicator => CM_7
2026-11-24 20:42bot-cgFile Added: oim-purpose-reshuffle.jpg
2026-11-24 20:42bot-cgFile Added: oim-goals-stable-order-v16f6f629.diff