Преглед на файлове

add option to delete from ente

Neeraj Gupta преди 3 години
родител
ревизия
26addf2bf2
променени са 1 файла, в които са добавени 11 реда и са изтрити 0 реда
  1. 11 0
      lib/ui/gallery_app_bar_widget.dart

+ 11 - 0
lib/ui/gallery_app_bar_widget.dart

@@ -499,6 +499,17 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
           showToast("files deleted from device");
           showToast("files deleted from device");
         },
         },
       ));
       ));
+      actions.add(CupertinoActionSheetAction(
+        child: Text("ente"),
+        isDestructiveAction: true,
+        onPressed: () async {
+          Navigator.of(context, rootNavigator: true).pop();
+          await deleteFilesFromRemoteOnly(
+              context, widget.selectedFiles.files.toList());
+          _clearSelectedFiles();
+          showToast("deleted files are moved to trash");
+        },
+      ));
       actions.add(CupertinoActionSheetAction(
       actions.add(CupertinoActionSheetAction(
         child: Text("everywhere"),
         child: Text("everywhere"),
         isDestructiveAction: true,
         isDestructiveAction: true,