Neeraj Gupta 2 年之前
父節點
當前提交
b06fc72614

+ 6 - 14
lib/ui/components/bottom_action_bar/action_bar_widget.dart

@@ -77,21 +77,13 @@ class _ActionBarWidgetState extends State<ActionBarWidget> {
                   ? ValueListenableBuilder(
                       valueListenable: _selectedFilesNotifier,
                       builder: (context, value, child) {
-                        if (widget.isCollaborator) {
-                          return Text(
-                            "${_selectedFilesNotifier.value} selected" +
-                                (_selectedOwnedFilesNotifier.value !=
-                                        _selectedFilesNotifier.value
-                                    ? " (${_selectedOwnedFilesNotifier.value} "
-                                        "yours) "
-                                    : ""),
-                            style: textTheme.body.copyWith(
-                              color: colorScheme.blurTextBase,
-                            ),
-                          );
-                        }
                         return Text(
-                          "${_selectedFilesNotifier.value} selected",
+                          "${_selectedFilesNotifier.value} selected" +
+                              (_selectedOwnedFilesNotifier.value !=
+                                      _selectedFilesNotifier.value
+                                  ? " (${_selectedOwnedFilesNotifier.value} "
+                                      "yours) "
+                                  : ""),
                           style: textTheme.body.copyWith(
                             color: colorScheme.blurTextBase,
                           ),

+ 0 - 3
lib/ui/components/bottom_action_bar/bottom_action_bar_widget.dart

@@ -18,7 +18,6 @@ class BottomActionBarWidget extends StatelessWidget {
   final VoidCallback? onCancel;
   final bool hasSmallerBottomPadding;
   final GalleryType type;
-  final bool isCollaborator;
 
   BottomActionBarWidget({
     required this.expandedMenu,
@@ -28,7 +27,6 @@ class BottomActionBarWidget extends StatelessWidget {
     this.text,
     this.iconButtons,
     this.onCancel,
-    this.isCollaborator = false,
     super.key,
   });
 
@@ -70,7 +68,6 @@ class BottomActionBarWidget extends StatelessWidget {
                       galleryType: type,
                       text: text,
                       iconButtons: _iconButtons(context),
-                      isCollaborator: isCollaborator,
                     ),
                   ),
                   expanded: expandedMenu,

+ 0 - 18
lib/ui/viewer/actions/file_selection_overlay_bar.dart

@@ -1,7 +1,6 @@
 import 'package:flutter/cupertino.dart';
 import 'package:flutter/material.dart';
 import 'package:page_transition/page_transition.dart';
-import 'package:photos/core/configuration.dart';
 import 'package:photos/models/collection.dart';
 import 'package:photos/models/device_collection.dart';
 import 'package:photos/models/gallery_type.dart';
@@ -113,7 +112,6 @@ class _FileSelectionOverlayBarState extends State<FileSelectionOverlayBar> {
             selectedFiles: widget.selectedFiles,
             hasSmallerBottomPadding: true,
             type: widget.galleryType,
-            isCollaborator: _isCollaborator(),
             expandedMenu: FileSelectionActionWidget(
               widget.galleryType,
               widget.selectedFiles,
@@ -162,20 +160,4 @@ class _FileSelectionOverlayBarState extends State<FileSelectionOverlayBar> {
         ? _bottomPosition.value = 0.0
         : _bottomPosition.value = -150.0;
   }
-
-  bool _isCollaborator() {
-    if (widget.collection == null) {
-      return false;
-    }
-    if (widget.galleryType == GalleryType.ownedCollection) {
-      return false;
-    }
-    final userID = Configuration.instance.getUserID();
-    for (final user in widget.collection!.getSharees()) {
-      if (user.id == userID) {
-        return user.isCollaborator;
-      }
-    }
-    return false;
-  }
 }