mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
refactor(mobile): render list (#16303)
* refactor(mobile): render list 2 * wip * wip: asset selection page * remove render_list provider * remove dead code * yaml format * remove unused file * woop woop more clean up * woop woop more clean up 2 * fix: album selection doesn't load instantly
This commit is contained in:
parent
7c851893b4
commit
d0381fddec
26 changed files with 134 additions and 140 deletions
|
|
@ -1,26 +0,0 @@
|
|||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/widgets/asset_grid/asset_grid_data_structure.dart';
|
||||
import 'package:immich_mobile/providers/app_settings.provider.dart';
|
||||
import 'package:immich_mobile/services/app_settings.service.dart';
|
||||
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||
import 'package:isar/isar.dart';
|
||||
|
||||
Stream<RenderList> renderListGenerator(
|
||||
QueryBuilder<Asset, Asset, QAfterSortBy> query,
|
||||
StreamProviderRef<RenderList> ref,
|
||||
) {
|
||||
final settings = ref.watch(appSettingsServiceProvider);
|
||||
final groupBy =
|
||||
GroupAssetsBy.values[settings.getSetting(AppSettingsEnum.groupAssetsBy)];
|
||||
return renderListGeneratorWithGroupBy(query, groupBy);
|
||||
}
|
||||
|
||||
Stream<RenderList> renderListGeneratorWithGroupBy(
|
||||
QueryBuilder<Asset, Asset, QAfterSortBy> query,
|
||||
GroupAssetsBy groupBy,
|
||||
) async* {
|
||||
yield await RenderList.fromQuery(query, groupBy);
|
||||
await for (final _ in query.watchLazy()) {
|
||||
yield await RenderList.fromQuery(query, groupBy);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue