mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
fix: show delete on device when asset has a local match (#22143)
* fix: show delete on device when asset has a local match * change test description --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
20733bd7df
commit
53c67f4d71
2 changed files with 16 additions and 1 deletions
|
|
@ -102,7 +102,7 @@ enum ActionButtonType {
|
|||
context.asset.hasRemote,
|
||||
ActionButtonType.deleteLocal =>
|
||||
!context.isInLockedView && //
|
||||
context.asset.storage == AssetState.local,
|
||||
context.asset.hasLocal,
|
||||
ActionButtonType.upload =>
|
||||
!context.isInLockedView && //
|
||||
context.asset.storage == AssetState.local,
|
||||
|
|
|
|||
|
|
@ -502,6 +502,21 @@ void main() {
|
|||
|
||||
expect(ActionButtonType.deleteLocal.shouldShow(context), isFalse);
|
||||
});
|
||||
|
||||
test('should show when asset is merged', () {
|
||||
final context = ActionButtonContext(
|
||||
asset: mergedAsset,
|
||||
isOwner: true,
|
||||
isArchived: false,
|
||||
isTrashEnabled: true,
|
||||
isInLockedView: false,
|
||||
currentAlbum: null,
|
||||
advancedTroubleshooting: false,
|
||||
source: ActionSource.timeline,
|
||||
);
|
||||
|
||||
expect(ActionButtonType.deleteLocal.shouldShow(context), isTrue);
|
||||
});
|
||||
});
|
||||
|
||||
group('upload button', () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue