mirror of
https://github.com/we-promise/sure.git
synced 2026-07-12 12:55:20 +00:00
* fix(mobile): in-progress feedback for the Clear local data action The reset- and delete-account tiles already disable and show a spinner while their network calls are in flight, but "Clear local data" (an async op that wipes offline storage and clears the category/merchant/tag providers) had no in-progress feedback. The settings list stayed fully interactive during the wipe, so the row could be tapped again. Mirror the existing reset/delete pattern: add an _isClearingData flag (set before the work, cleared in a finally with a mounted guard) and give the tile a trailing CircularProgressIndicator plus enabled/onTap guards while it runs. Completes the in-progress feedback across all destructive async actions in Settings. flutter analyze: no new issues; full suite (166) green. * refactor(mobile): unified destructive action guard in settings Replace three independent boolean flags (_isClearingData, _isResettingAccount, _isDeletingAccount) with a single _activeDestructiveAction string. All three danger-zone tiles now disable together whenever any destructive operation is running, preventing concurrent destructive actions. * refactor(mobile): name the destructive-action discriminator constants Address review feedback (jjmata): replace the scattered 'clear' / 'reset' / 'delete' string literals used for _activeDestructiveAction with private constants (_clearAction / _resetAction / _deleteAction), defined once. The discriminator can no longer drift via a mistyped literal across the handlers and tiles — a typo'd constant name fails to compile. No behavior change.