π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Clean up file info details for trashed files
Neeraj Gupta5eee30a3b2b9
diff --git a/mobile/apps/photos/lib/ui/viewer/file/file_details_widget.dart b/mobile/apps/photos/lib/ui/viewer/file/file_details_widget.dartindex c1e212da7d..042aa5fb9a 100644--- a/mobile/apps/photos/lib/ui/viewer/file/file_details_widget.dart+++ b/mobile/apps/photos/lib/ui/viewer/file/file_details_widget.dart@@ -150,13 +150,14 @@ class _FileDetailsWidgetState extends State<FileDetailsWidget> {//Make sure the bottom most tile is always the same one, that is it should//not be rendered only if a condition is met.final fileDetailsTiles = <Widget>[];+ final bool canEditCaption = isFileOwner && !file.isTrash;fileDetailsTiles.add(!widget.file.isUploaded ||- (!isFileOwner && (widget.file.caption?.isEmpty ?? true))+ (!canEditCaption && (widget.file.caption?.isEmpty ?? true))? const SizedBox(height: 16): Padding(padding: const EdgeInsets.only(top: 8, bottom: 24),- child: isFileOwner+ child: canEditCaption? FileCaptionWidget(file: widget.file): FileCaptionReadyOnly(caption: widget.file.caption!),),@@ -310,7 +311,9 @@ class _FileDetailsWidgetState extends State<FileDetailsWidget> {],);}- fileDetailsTiles.add(AlbumsItemWidget(file, _currentUserID));+ if (!file.isTrash) {+ fileDetailsTiles.add(AlbumsItemWidget(file, _currentUserID));+ }return SafeArea(top: false,diff --git a/mobile/apps/photos/lib/ui/viewer/file_details/creation_time_item_widget.dart b/mobile/apps/photos/lib/ui/viewer/file_details/creation_time_item_widget.dartindex afde22db7d..d142b28728 100644--- a/mobile/apps/photos/lib/ui/viewer/file_details/creation_time_item_widget.dart+++ b/mobile/apps/photos/lib/ui/viewer/file_details/creation_time_item_widget.dart@@ -1,5 +1,6 @@import "package:flutter/material.dart";import "package:intl/intl.dart";+import "package:photos/models/file/extensions/file_props.dart";import 'package:photos/models/file/file.dart';import "package:photos/theme/ente_theme.dart";import "package:photos/ui/components/info_item_widget.dart";@@ -42,7 +43,8 @@ class _CreationTimeItemState extends State<CreationTimeItem> {]),editOnTap: ((widget.file.ownerID == null ||widget.file.ownerID == widget.currentUserID) &&- widget.file.uploadedFileID != null)+ widget.file.uploadedFileID != null &&+ !widget.file.isTrash)? () {_showDateTimePicker(widget.file);}diff --git a/mobile/apps/photos/lib/ui/viewer/file_details/file_properties_item_widget.dart b/mobile/apps/photos/lib/ui/viewer/file_details/file_properties_item_widget.dartindex 2cedc1da2b..3f3c6f4c21 100644--- a/mobile/apps/photos/lib/ui/viewer/file_details/file_properties_item_widget.dart+++ b/mobile/apps/photos/lib/ui/viewer/file_details/file_properties_item_widget.dart@@ -1,5 +1,6 @@import "package:flutter/material.dart";import 'package:path/path.dart' as path;+import "package:photos/models/file/extensions/file_props.dart";import 'package:photos/models/file/file.dart';import 'package:photos/models/file/file_type.dart';import "package:photos/theme/ente_theme.dart";@@ -38,7 +39,8 @@ class _FilePropertiesItemWidgetState extends State<FilePropertiesItemWidget> {path.extension(widget.file.displayName).toUpperCase(),subtitleSection: _subTitleSection(),editOnTap: widget.file.uploadedFileID == null ||- widget.file.ownerID != widget.currentUserID+ widget.file.ownerID != widget.currentUserID ||+ widget.file.isTrash? null: () async {await editFilename(context, widget.file);