瀏覽代碼

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");
         },
       ));
+      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(
         child: Text("everywhere"),
         isDestructiveAction: true,