mirror of
https://github.com/immich-app/immich.git
synced 2026-07-04 03:45:59 -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>
25 lines
660 B
Dart
25 lines
660 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:immich_mobile/presentation/actions/action.dart';
|
|
import 'package:immich_mobile/providers/timeline/multiselect.provider.dart';
|
|
|
|
class TimelineAction extends BaseAction {
|
|
final BaseAction action;
|
|
|
|
const TimelineAction({required this.action});
|
|
|
|
@override
|
|
IconData get icon => action.icon;
|
|
|
|
@override
|
|
String label(ActionScope scope) => action.label(scope);
|
|
|
|
@override
|
|
bool isVisible(ActionScope scope) => action.isVisible(scope);
|
|
|
|
@override
|
|
Future<void> onAction(ActionScope scope) async {
|
|
await action.onAction(scope);
|
|
scope.ref.read(multiSelectProvider.notifier).reset();
|
|
}
|
|
}
|