What happened?
On Android, the Backup reminder can open while the user is scanning a QR code, and it closes the scanner. Reported by @catch-21.
The tab-bar scanner is a sheet (Sheet.QrScanner) opened over Home, so Home stays resumed and the timed-sheet check that Home schedules two seconds after it resumes still runs. TimedSheetManager.checkAndShowNextSheet() does not look at what is on screen. The only guard, where AppViewModel collects timedSheetManager.currentSheet, skips just the sheets in isHighPrioritySheet (Gift, Send, BTCPayConnection, LnurlAuth, Pin, PubkyAuth). The scanner is not one of them, so showSheet(Sheet.TimedSheet(...)) replaces it.
All five timed sheets use this path (App update, Backup, Notifications, QuickPay, High balance), so any of them can interrupt the scanner.
Expected behavior
No timed sheet opens while the QR scanner, or any other sheet, is open. A timed sheet that comes due then stays queued and shows on a later Home visit, as on iOS.
Steps to Reproduce
- Use a wallet with a non-zero balance and an unverified backup, with the Backup reminder not dismissed in the last day.
- Go to Home, then tap Scan in the tab bar within about two seconds.
- The Backup reminder replaces the scanner.
These steps come from the report and a code reading; not yet reproduced on a device.
Logs / Screenshots / Recordings
N/A
Bitkit Version
Not stated in the report; code read at 67685e3 on master.
Device / OS
Android
Reproducibility
Intermittent: depends on when the scanner opens relative to the timed-sheet check.
Additional context
- The window is wider than two seconds. The App update sheet is checked first and waits on a network request before Backup is checked. Opening the scanner may also re-arm the check: the camera permission request and the gallery picker pause and resume the Activity, which Home treats as leaving and returning. Needs device confirmation.
- The same guard drops a timed sheet while Send is open:
TimedSheetManager has already taken it off its queue when AppViewModel skips it, so it does not show again until Bitkit restarts.
- iOS is not affected: its
TimedSheetManager cancels the pending check whenever a sheet is shown and skips the check while any sheet is open, and the tab-bar scanner opens as a sheet.
- Suggested fix: match iOS. Check for an open sheet before taking a timed sheet off the queue, and cancel the pending check when any sheet opens. Per-timed-sheet rules can be added on top if a sheet ever needs to show over another one; this case does not need them.
What happened?
On Android, the Backup reminder can open while the user is scanning a QR code, and it closes the scanner. Reported by @catch-21.
The tab-bar scanner is a sheet (
Sheet.QrScanner) opened over Home, so Home stays resumed and the timed-sheet check that Home schedules two seconds after it resumes still runs.TimedSheetManager.checkAndShowNextSheet()does not look at what is on screen. The only guard, whereAppViewModelcollectstimedSheetManager.currentSheet, skips just the sheets inisHighPrioritySheet(Gift, Send, BTCPayConnection, LnurlAuth, Pin, PubkyAuth). The scanner is not one of them, soshowSheet(Sheet.TimedSheet(...))replaces it.All five timed sheets use this path (App update, Backup, Notifications, QuickPay, High balance), so any of them can interrupt the scanner.
Expected behavior
No timed sheet opens while the QR scanner, or any other sheet, is open. A timed sheet that comes due then stays queued and shows on a later Home visit, as on iOS.
Steps to Reproduce
These steps come from the report and a code reading; not yet reproduced on a device.
Logs / Screenshots / Recordings
N/A
Bitkit Version
Not stated in the report; code read at 67685e3 on
master.Device / OS
Android
Reproducibility
Intermittent: depends on when the scanner opens relative to the timed-sheet check.
Additional context
TimedSheetManagerhas already taken it off its queue whenAppViewModelskips it, so it does not show again until Bitkit restarts.TimedSheetManagercancels the pending check whenever a sheet is shown and skips the check while any sheet is open, and the tab-bar scanner opens as a sheet.