fix(mobile): retry diagnostics teardown

Co-authored-by: npub1ft62tztwwm2x9xamk25smmuaj4sfckdkldksruf2x2jwqalffkrq0g7arr <4af4a5896e76d4629bbbb2a90def9d95609c59b6fb6d01f12a32a4e077e94d86@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: npub1ft62tztwwm2x9xamk25smmuaj4sfckdkldksruf2x2jwqalffkrq0g7arr <4af4a5896e76d4629bbbb2a90def9d95609c59b6fb6d01f12a32a4e077e94d86@sprout-oss.stage.blox.sqprod.co>
This commit is contained in:
npub1ft62tztwwm2x9xamk25smmuaj4sfckdkldksruf2x2jwqalffkrq0g7arr
2026-07-19 17:11:52 -07:00
parent a072957adb
commit e73f3c2288
2 changed files with 18 additions and 1 deletions

View File

@@ -61,6 +61,12 @@ class DiagnosticsController extends ChangeNotifier {
Future<void> setConsent(bool granted) {
return _serialize(() async {
if (_consentGranted == granted) {
// A failed close keeps the runtime initialized even though the
// persisted preference and visible control are already off. Allow the
// same revocation to retry teardown until it succeeds.
if (!granted && _initialized) {
await _applyCurrentConsent();
}
return;
}