mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:06:56 -04:00
wip
This commit is contained in:
parent
3417330bdf
commit
9266197cd2
@ -26,7 +26,8 @@ class AlbumsCollectionPage extends HookConsumerWidget {
|
||||
const AlbumsCollectionPage({super.key});
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final albums = ref.watch(albumProviderV2);
|
||||
final albums =
|
||||
ref.watch(albumProviderV2).where((album) => album.isRemote).toList();
|
||||
final albumSortOption = ref.watch(albumSortByOptionsProvider);
|
||||
final albumSortIsReverse = ref.watch(albumSortOrderProvider);
|
||||
final sorted = albumSortOption.sortFn(albums, albumSortIsReverse);
|
||||
|
@ -4,6 +4,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/extensions/asyncvalue_extensions.dart';
|
||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||
import 'package:immich_mobile/providers/album/album.provider.dart';
|
||||
import 'package:immich_mobile/providers/album/albumv2.provider.dart';
|
||||
import 'package:immich_mobile/providers/search/people.provider.dart';
|
||||
import 'package:immich_mobile/providers/server_info.provider.dart';
|
||||
import 'package:immich_mobile/routing/router.dart';
|
||||
@ -141,8 +142,8 @@ class AlbumsCollectionCard extends ConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final albums = isLocal
|
||||
? ref.watch(albumProvider).where((album) => album.isLocal)
|
||||
: ref.watch(albumProvider).where((album) => album.isRemote);
|
||||
? ref.watch(albumProviderV2).where((album) => album.isLocal)
|
||||
: ref.watch(albumProviderV2).where((album) => album.isRemote);
|
||||
final size = MediaQuery.of(context).size.width * 0.5 - 20;
|
||||
return GestureDetector(
|
||||
onTap: () => context.pushRoute(
|
||||
|
@ -12,7 +12,7 @@ import 'package:isar/isar.dart';
|
||||
|
||||
class AlbumNotifierV2 extends StateNotifier<List<Album>> {
|
||||
AlbumNotifierV2(this._albumService, this.db) : super([]) {
|
||||
final query = db.albums.filter().remoteIdIsNotNull();
|
||||
final query = db.albums.where();
|
||||
|
||||
query.findAll().then((value) {
|
||||
if (mounted) {
|
||||
|
@ -112,9 +112,9 @@ class AlbumThumbnailCard extends StatelessWidget {
|
||||
child: Text(
|
||||
album.name,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: context.textTheme.labelLarge?.copyWith(
|
||||
style: context.textTheme.titleSmall?.copyWith(
|
||||
color: context.colorScheme.onSurface,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user