mirror of
https://github.com/immich-app/immich.git
synced 2025-11-11 09:06:53 -05:00
* feat: show "appears in" albums on asset viewer bottom sheet fix: multiple RemoteAlbumPages in navigation stack this also allows us to not have to set the current album before navigating to RemoteAlbumPage chore: clarification comments handle nested album pages fix: hide "appears in" when an asset is not in any albums fix: way more bottom padding for some reason we can't query the safe area here :/ * fix: bottom sheet now is usable when navigating to another asset viewer * fix: rebase conflict * fix: restore ancestors album to currentRemoteAlbumProvider when popping * fix: view flashing when dismissing a album viewer * chore: code review changes * fix: styling and padding * chore: rework currentRemoteAlbumProvider to be scoped by the Remote album page * fix: override remote album provider on required pages * chore: convert query to all SQL calls instead of matching in Dart * fix: album query * fix: unawaited future * Update deep_link.service.dart --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
53 lines
1.5 KiB
Dart
53 lines
1.5 KiB
Dart
import 'dart:async';
|
|
|
|
import 'package:auto_route/auto_route.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import 'package:immich_mobile/presentation/widgets/album/album_selector.widget.dart';
|
|
import 'package:immich_mobile/providers/infrastructure/album.provider.dart';
|
|
import 'package:immich_mobile/routing/router.dart';
|
|
import 'package:immich_mobile/widgets/common/immich_sliver_app_bar.dart';
|
|
|
|
@RoutePage()
|
|
class DriftAlbumsPage extends ConsumerStatefulWidget {
|
|
const DriftAlbumsPage({super.key});
|
|
|
|
@override
|
|
ConsumerState<DriftAlbumsPage> createState() => _DriftAlbumsPageState();
|
|
}
|
|
|
|
class _DriftAlbumsPageState extends ConsumerState<DriftAlbumsPage> {
|
|
Future<void> onRefresh() async {
|
|
await ref.read(remoteAlbumProvider.notifier).refresh();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return RefreshIndicator(
|
|
onRefresh: onRefresh,
|
|
edgeOffset: 100,
|
|
child: CustomScrollView(
|
|
slivers: [
|
|
ImmichSliverAppBar(
|
|
snap: false,
|
|
floating: false,
|
|
pinned: true,
|
|
actions: [
|
|
IconButton(
|
|
icon: const Icon(Icons.add_rounded, size: 28),
|
|
onPressed: () => context.pushRoute(const DriftCreateAlbumRoute()),
|
|
),
|
|
],
|
|
showUploadButton: false,
|
|
),
|
|
AlbumSelector(
|
|
onAlbumSelected: (album) {
|
|
context.router.push(RemoteAlbumRoute(album: album));
|
|
},
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|