mirror of
https://github.com/immich-app/immich.git
synced 2026-07-04 11:47:29 -07:00
cb1af3a8ec
* chore: cleanup partner action test * feat: favorite bottom sheet action * review suggestions * implicit favorite handling * feat: viewer favorite icon to action (#29321) * feat: viewer favorite icon to action * feat: advance info action * implicit favorite handling * feat: viewer favorite icon to action # Conflicts: # mobile/lib/presentation/widgets/asset_viewer/viewer_top_app_bar.widget.dart --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> * chore: timeline action test (#29324) Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> * clear selection only on success --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
28 lines
999 B
Dart
28 lines
999 B
Dart
import 'dart:async';
|
|
|
|
import 'package:auto_route/auto_route.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:immich_mobile/domain/models/asset/base_asset.model.dart';
|
|
import 'package:immich_mobile/generated/translations.g.dart';
|
|
import 'package:immich_mobile/presentation/actions/action.dart';
|
|
import 'package:immich_mobile/providers/infrastructure/setting.provider.dart';
|
|
import 'package:immich_mobile/routing/router.dart';
|
|
|
|
class AssetDebugAction extends AssetAction<BaseAsset> {
|
|
const AssetDebugAction({required super.assets});
|
|
|
|
@override
|
|
IconData get icon => Icons.help_outline_rounded;
|
|
|
|
@override
|
|
String label(ActionScope scope) => scope.context.t.troubleshoot;
|
|
|
|
@override
|
|
bool isVisible(ActionScope scope) =>
|
|
assets.length == 1 && scope.ref.watch(settingsProvider.notifier).get(.advancedTroubleshooting);
|
|
|
|
@override
|
|
Future<void> onAction(ActionScope scope) async =>
|
|
unawaited(scope.context.pushRoute(AssetTroubleshootRoute(asset: assets.first)));
|
|
}
|