mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(mobile): handle readonly and offline assets (#5565)
* feat: add isReadOnly and isOffline fields to Asset collection * refactor: move asset iterable filters to extension * hide asset actions based on offline and readOnly fields * pr changes * chore: doc comments --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
56cde0438c
commit
a233e176e5
10 changed files with 333 additions and 105 deletions
|
|
@ -156,7 +156,7 @@ class ExifBottomSheet extends HookConsumerWidget {
|
|||
buildLocation() {
|
||||
// Guard no lat/lng
|
||||
if (!hasCoordinates()) {
|
||||
return asset.isRemote
|
||||
return asset.isRemote && !asset.isReadOnly
|
||||
? ListTile(
|
||||
minLeadingWidth: 0,
|
||||
contentPadding: const EdgeInsets.all(0),
|
||||
|
|
@ -194,7 +194,7 @@ class ExifBottomSheet extends HookConsumerWidget {
|
|||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
).tr(),
|
||||
if (asset.isRemote)
|
||||
if (asset.isRemote && !asset.isReadOnly)
|
||||
IconButton(
|
||||
onPressed: () => handleEditLocation(
|
||||
ref,
|
||||
|
|
@ -251,7 +251,7 @@ class ExifBottomSheet extends HookConsumerWidget {
|
|||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
if (asset.isRemote)
|
||||
if (asset.isRemote && !asset.isReadOnly)
|
||||
IconButton(
|
||||
onPressed: () => handleEditDateTime(
|
||||
ref,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue