|
@@ -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;
|
|
|
- }
|
|
|
}
|