Skip to content

Commit 02aa8d7

Browse files
fixup! TW-2912 Allow mobile clear cache
1 parent 6ae9ddf commit 02aa8d7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/pages/settings_dashboard/settings_data_and_storage/settings_data_and_storage.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class SettingsDataAndStorageController extends State<SettingsDataAndStorage> {
8585
.scanDirectory(tempDir.path);
8686
return StorageScanResult(result);
8787
} catch (e, s) {
88-
Logs().e('SettingsDataAndStorage::_startScan', e, s);
88+
Logs().e('SettingsDataAndStorage::_getCacheCategories', e, s);
8989
rethrow;
9090
}
9191
}
@@ -118,7 +118,9 @@ class SettingsDataAndStorageController extends State<SettingsDataAndStorage> {
118118
await entity.delete(recursive: true);
119119
}
120120
}
121-
TwakeSnackBar.show(context, l10n.cacheClearedSuccessfully);
121+
if (context.mounted) {
122+
TwakeSnackBar.show(context, l10n.cacheClearedSuccessfully);
123+
}
122124
} catch (e, s) {
123125
Logs().e('SettingsDataAndStorage:_clearCacheDir', e, s);
124126
}

0 commit comments

Comments
 (0)