Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Allow download for shared files

AmanRajSinghMourya1ae7c84c6086
diff --git a/mobile/apps/locker/lib/ui/pages/collection_page.dart b/mobile/apps/locker/lib/ui/pages/collection_page.dart
index 0a143608f8..d9fd82c9d1 100644
--- a/mobile/apps/locker/lib/ui/pages/collection_page.dart
+++ b/mobile/apps/locker/lib/ui/pages/collection_page.dart
@@ -113,8 +113,6 @@ class _CollectionPageState extends UploaderPageState<CollectionPage>
isSearchActive ? _filteredFiles : _files;
bool get _isSelectionEnabled =>
- collectionViewType != CollectionViewType.sharedCollectionViewer &&
- collectionViewType != CollectionViewType.sharedCollectionCollaborator &&
collectionViewType != CollectionViewType.quickLink;
@override
diff --git a/mobile/apps/locker/lib/ui/viewer/actions/file_selection_overlay_bar.dart b/mobile/apps/locker/lib/ui/viewer/actions/file_selection_overlay_bar.dart
index e5333a49cb..5792669762 100644
--- a/mobile/apps/locker/lib/ui/viewer/actions/file_selection_overlay_bar.dart
+++ b/mobile/apps/locker/lib/ui/viewer/actions/file_selection_overlay_bar.dart
@@ -442,11 +442,6 @@ class _FileSelectionOverlayBarState extends State<FileSelectionOverlayBar> {
}
Future<void> _downloadFile(BuildContext context, EnteFile file) async {
- final currentUserID = Configuration.instance.getUserID();
- if (file.ownerID != currentUserID) {
- showToast(context, "Download is not supported for shared files");
- return;
- }
try {
final success = await FileUtil.downloadFile(context, file);
if (success) {
@@ -467,13 +462,12 @@ class _FileSelectionOverlayBarState extends State<FileSelectionOverlayBar> {
BuildContext context,
List<EnteFile> files,
) async {
- final ownedFiles = _getOwnedFiles(files);
- if (ownedFiles.isEmpty) {
+ if (files.isEmpty) {
return;
}
try {
- final success = await FileUtil.downloadFiles(context, ownedFiles);
+ final success = await FileUtil.downloadFiles(context, files);
if (success) {
widget.selectedFiles.clearAll();
}