mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
* feat(mobile): archive action * fix: lint * Update i18n/en.json Co-authored-by: Alex <alex.tran1502@gmail.com> * fix: lint * fix: lint --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
36 lines
823 B
Dart
36 lines
823 B
Dart
import 'package:immich_mobile/services/action.service.dart';
|
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
|
|
|
final actionProvider = NotifierProvider<ActionNotifier, void>(
|
|
ActionNotifier.new,
|
|
dependencies: [
|
|
actionServiceProvider,
|
|
],
|
|
);
|
|
|
|
class ActionNotifier extends Notifier<void> {
|
|
late final ActionService _service;
|
|
|
|
ActionNotifier() : super();
|
|
|
|
@override
|
|
void build() {
|
|
_service = ref.watch(actionServiceProvider);
|
|
}
|
|
|
|
Future<void> favorite(List<String> ids) async {
|
|
await _service.favorite(ids);
|
|
}
|
|
|
|
Future<void> unFavorite(List<String> ids) async {
|
|
await _service.unFavorite(ids);
|
|
}
|
|
|
|
Future<void> archive(List<String> ids) async {
|
|
await _service.archive(ids);
|
|
}
|
|
|
|
Future<void> unArchive(List<String> ids) async {
|
|
await _service.unArchive(ids);
|
|
}
|
|
}
|