mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
fix(mobile): disable trash review kebab menu actions when nothing is pending
This commit is contained in:
parent
d3b04378cc
commit
fd01d50c02
1 changed files with 3 additions and 2 deletions
|
|
@ -94,6 +94,7 @@ class _TrashReviewKebabMenu extends ConsumerWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final hasPendingAssets = (ref.watch(pendingTrashReviewCountProvider).value ?? 0) > 0;
|
||||
return MenuAnchor(
|
||||
consumeOutsideTap: true,
|
||||
style: MenuStyle(
|
||||
|
|
@ -109,13 +110,13 @@ class _TrashReviewKebabMenu extends ConsumerWidget {
|
|||
BaseActionButton(
|
||||
label: context.t.keep_all,
|
||||
iconData: Icons.cloud_off_outlined,
|
||||
onPressed: () => _keepAllOnDevice(context, ref),
|
||||
onPressed: hasPendingAssets ? () => _keepAllOnDevice(context, ref) : null,
|
||||
menuItem: true,
|
||||
),
|
||||
BaseActionButton(
|
||||
label: context.t.trash_all,
|
||||
iconData: Icons.delete_outline_rounded,
|
||||
onPressed: () => _moveAllToTrash(context, ref),
|
||||
onPressed: hasPendingAssets ? () => _moveAllToTrash(context, ref) : null,
|
||||
menuItem: true,
|
||||
),
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue