Sfoglia il codice sorgente

fix: export logs action

Prateek Sunal 1 anno fa
parent
commit
d9b56a95aa
1 ha cambiato i file con 15 aggiunte e 1 eliminazioni
  1. 15 1
      auth/lib/utils/email_util.dart

+ 15 - 1
auth/lib/utils/email_util.dart

@@ -187,7 +187,21 @@ Future<void> shareLogs(
     ],
   );
   if (result?.action != null && result!.action == ButtonAction.second) {
-    await exportLogs(context, zipFilePath);
+    Future.delayed(
+      const Duration(milliseconds: 200),
+      () => shareDialog(
+        context,
+        context.l10n.exportLogs,
+        saveAction: () async {
+          final zipFilePath = await getZippedLogsFile(context);
+          await exportLogs(context, zipFilePath);
+        },
+        sendAction: () async {
+          final zipFilePath = await getZippedLogsFile(context);
+          await exportLogs(context, zipFilePath, true);
+        },
+      ),
+    );
   }
 }