mirror of
https://github.com/ente-io/ente.git
synced 2025-08-08 07:28:26 +00:00
[mob] Support for force refresh
This commit is contained in:
parent
9c1f744f73
commit
b4c6805d42
@ -147,10 +147,13 @@ class MagicCacheService {
|
||||
return (await getApplicationSupportDirectory()).path + "/cache/magic_cache";
|
||||
}
|
||||
|
||||
Future<void> updateCache() async {
|
||||
Future<void> updateCache({bool forced = false}) async {
|
||||
if (!enableDiscover) {
|
||||
return;
|
||||
}
|
||||
if (forced) {
|
||||
_pendingUpdateReason.add("Forced update");
|
||||
}
|
||||
try {
|
||||
if (_pendingUpdateReason.isEmpty || _isUpdateInProgress) {
|
||||
_logger.info(
|
||||
|
@ -222,7 +222,7 @@ class _MLDebugSectionWidgetState extends State<MLDebugSectionWidget> {
|
||||
trailingIconIsMuted: true,
|
||||
onTap: () async {
|
||||
try {
|
||||
await MagicCacheService.instance.updateCache();
|
||||
await MagicCacheService.instance.updateCache(forced: true);
|
||||
} catch (e, s) {
|
||||
logger.warning('Update discover failed', e, s);
|
||||
await showGenericErrorDialog(context: context, error: e);
|
||||
|
Loading…
x
Reference in New Issue
Block a user