Browse Source

Replace add icon with upload for local folders

Neeraj Gupta 3 years ago
parent
commit
08b20de546
1 changed files with 12 additions and 3 deletions
  1. 12 3
      lib/ui/gallery_app_bar_widget.dart

+ 12 - 3
lib/ui/gallery_app_bar_widget.dart

@@ -259,12 +259,21 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
     // skip add button for incoming collection till this feature is implemented
     if (Configuration.instance.hasConfiguredAccount() &&
         widget.type != GalleryAppBarType.shared_collection) {
+      String msg = "add";
+      IconData iconData =
+          Platform.isAndroid ? Icons.add_outlined : CupertinoIcons.add;
+      // show upload icon instead of add for files selected in local gallery
+      if (widget.type == GalleryAppBarType.local_folder) {
+        msg = "upload";
+        iconData = Platform.isAndroid
+            ? Icons.cloud_upload
+            : CupertinoIcons.cloud_upload;
+      }
       actions.add(
         Tooltip(
-          message: "add",
+          message: msg,
           child: IconButton(
-            icon: Icon(
-                Platform.isAndroid ? Icons.add_outlined : CupertinoIcons.add),
+            icon: Icon(iconData),
             onPressed: () {
               _createAlbum();
             },