Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Show success toast messages after file update

AmanRajSinghMourya3ab72e23468e
diff --git a/mobile/apps/locker/lib/utils/file_actions.dart b/mobile/apps/locker/lib/utils/file_actions.dart
index 14b63f77b1..7bcfe770b0 100644
--- a/mobile/apps/locker/lib/utils/file_actions.dart
+++ b/mobile/apps/locker/lib/utils/file_actions.dart
@@ -151,15 +151,12 @@ class FileActions {
}
}
+ showToast(context, context.l10n.fileUpdatedSuccessfully);
+
await CollectionService.instance.sync();
await dialog.hide();
- if (!context.mounted) {
- onSuccess?.call();
- return;
- }
-
onSuccess?.call();
} catch (e) {
await dialog.hide();
@@ -315,10 +312,10 @@ class FileActions {
await dialog.hide();
if (context.mounted) {
- showToast(
- context,
- context.l10n.fileDeletedSuccessfully,
- );
+ showToast(
+ context,
+ context.l10n.fileDeletedSuccessfully,
+ );
}
onSuccess?.call();