mirror of
https://github.com/immich-app/immich.git
synced 2025-09-29 15:31:13 -04:00
* show only local assets from albums selected for backup # Conflicts: # mobile/lib/infrastructure/repositories/db.repository.drift.dart * ignore backup selection * fix: backup album ownerId * fix: backup album ownerId * only show local only assets that are selected for backup * add index on visibility and backup selection * fix: video not playing in search view * remove safe area from bottom bar * refactor stack count with a CTE and local asset with a SELECT * fix lint * remove redundant COALESCE * remove stack count from main timeline query --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Co-authored-by: Alex <alex.tran1502@gmail.com>
21 lines
716 B
Dart
21 lines
716 B
Dart
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import 'package:immich_mobile/domain/models/asset/base_asset.model.dart';
|
|
import 'package:immich_mobile/providers/infrastructure/asset.provider.dart';
|
|
|
|
class StackChildrenNotifier
|
|
extends AutoDisposeFamilyAsyncNotifier<List<RemoteAsset>, BaseAsset?> {
|
|
@override
|
|
Future<List<RemoteAsset>> build(BaseAsset? asset) async {
|
|
if (asset == null || asset is! RemoteAsset || asset.stackId == null) {
|
|
return const [];
|
|
}
|
|
|
|
return ref.watch(assetServiceProvider).getStack(asset);
|
|
}
|
|
}
|
|
|
|
final stackChildrenNotifier = AsyncNotifierProvider.autoDispose
|
|
.family<StackChildrenNotifier, List<RemoteAsset>, BaseAsset?>(
|
|
StackChildrenNotifier.new,
|
|
);
|