mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
feat(mobile): Multiselect add to favorite from the timeline (#1558)
* multiselect add to favorites
This commit is contained in:
@@ -34,6 +34,18 @@ class FavoriteSelectionNotifier extends StateNotifier<Set<String>> {
|
||||
state.contains(asset.id),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> addToFavorites(Iterable<Asset> assets) {
|
||||
state = state.union(assets.map((a) => a.id).toSet());
|
||||
final futures = assets.map((a) =>
|
||||
ref.watch(assetProvider.notifier).toggleFavorite(
|
||||
a,
|
||||
true,
|
||||
),
|
||||
);
|
||||
|
||||
return Future.wait(futures);
|
||||
}
|
||||
}
|
||||
|
||||
final favoriteProvider =
|
||||
|
||||
Reference in New Issue
Block a user