Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mobile][photos] Rename system trash references

Priyanshu Dangare10bb2f3e3d93
diff --git a/mobile/apps/photos/lib/models/file/extensions/file_props.dart b/mobile/apps/photos/lib/models/file/extensions/file_props.dart
index 499d42ee0e..e60569fe36 100644
--- a/mobile/apps/photos/lib/models/file/extensions/file_props.dart
+++ b/mobile/apps/photos/lib/models/file/extensions/file_props.dart
@@ -44,7 +44,7 @@ extension FilePropsExtn on EnteFile {
bool get isTrashFile => this is TrashFile;
- bool get isSystemOnlyTrashFile => asTrashFile?.isSystemOnly ?? false;
+ bool get isDeviceOnlyTrashFile => asTrashFile?.isDeviceOnly ?? false;
TrashFile? get asTrashFile => (this is TrashFile) ? this as TrashFile : null;
diff --git a/mobile/apps/photos/lib/models/file/trash_file.dart b/mobile/apps/photos/lib/models/file/trash_file.dart
index 3b62d572a1..d9bdd847f3 100644
--- a/mobile/apps/photos/lib/models/file/trash_file.dart
+++ b/mobile/apps/photos/lib/models/file/trash_file.dart
@@ -8,7 +8,7 @@ class TrashFile extends EnteFile {
required this.createdAt,
required this.updateAt,
required this.deleteBy,
- required this.isSystemOnly,
+ required this.isDeviceOnly,
}) : super.from();
// time when file was put in the trash for first time
@@ -22,7 +22,7 @@ class TrashFile extends EnteFile {
// will go down
late int deleteBy;
- // This object represents the file in the device's system trash. The same file
+ // This object represents the file in the device trash. The same file
// may also have a separate entry in Ente's trash.
- bool isSystemOnly = false;
+ bool isDeviceOnly = false;
}
diff --git a/mobile/apps/photos/lib/module/download/file.dart b/mobile/apps/photos/lib/module/download/file.dart
index da5bf710b4..3c46e100f8 100644
--- a/mobile/apps/photos/lib/module/download/file.dart
+++ b/mobile/apps/photos/lib/module/download/file.dart
@@ -78,9 +78,9 @@ Future<File?> _getLocalDiskFile(
bool liveVideo = false,
bool isOrigin = false,
}) async {
- // Return null because reading a system trash file by its file system path
+ // Return null because reading a device trash file by its file system path
// fails with a permission-denied error.
- if (file.isSystemOnlyTrashFile) {
+ if (file.isDeviceOnlyTrashFile) {
return null;
}
diff --git a/mobile/apps/photos/lib/module/download/thumbnail.dart b/mobile/apps/photos/lib/module/download/thumbnail.dart
index 9cd81389e0..05a58e8d0e 100644
--- a/mobile/apps/photos/lib/module/download/thumbnail.dart
+++ b/mobile/apps/photos/lib/module/download/thumbnail.dart
@@ -206,7 +206,7 @@ Future<Uint8List?> getThumbnailFromLocal(
} else {
return file.getAsset.then((asset) async {
if (asset == null ||
- !(await asset.exists || file.isSystemOnlyTrashFile)) {
+ !(await asset.exists || file.isDeviceOnlyTrashFile)) {
return null;
}
return asset
diff --git a/mobile/apps/photos/lib/ui/viewer/file/video_widget_media_kit.dart b/mobile/apps/photos/lib/ui/viewer/file/video_widget_media_kit.dart
index 493384eb74..09842a8c84 100644
--- a/mobile/apps/photos/lib/ui/viewer/file/video_widget_media_kit.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file/video_widget_media_kit.dart
@@ -159,7 +159,7 @@ class _VideoWidgetMediaKitState extends State<VideoWidgetMediaKit>
} else {
widget.file.getAsset.then((asset) async {
if (asset == null ||
- !(await asset.exists || widget.file.isSystemOnlyTrashFile)) {
+ !(await asset.exists || widget.file.isDeviceOnlyTrashFile)) {
if (widget.file.uploadedFileID != null) {
_loadNetworkVideo();
}
diff --git a/mobile/apps/photos/lib/ui/viewer/file/video_widget_native.dart b/mobile/apps/photos/lib/ui/viewer/file/video_widget_native.dart
index b3664f44a7..da6c93cf90 100644
--- a/mobile/apps/photos/lib/ui/viewer/file/video_widget_native.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file/video_widget_native.dart
@@ -202,7 +202,7 @@ class _VideoWidgetNativeState extends State<VideoWidgetNative>
} else {
await widget.file.getAsset.then((asset) async {
if (asset == null ||
- !(await asset.exists || widget.file.isSystemOnlyTrashFile)) {
+ !(await asset.exists || widget.file.isDeviceOnlyTrashFile)) {
if (widget.file.uploadedFileID != null) {
_loadNetworkVideo(update);
}