mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
* feat(mobile): drift archive page * fix: lint * feat: include local indicator * remove join in bucket * remove showing local indicator in bucket --------- Co-authored-by: Alex <alex.tran1502@gmail.com> Co-authored-by: alex <alex@localhost-live.localdomain>
34 lines
1.0 KiB
Dart
34 lines
1.0 KiB
Dart
import 'package:auto_route/auto_route.dart';
|
|
import 'package:flutter/widgets.dart';
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import 'package:immich_mobile/presentation/widgets/timeline/timeline.widget.dart';
|
|
import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart';
|
|
import 'package:immich_mobile/providers/user.provider.dart';
|
|
|
|
@RoutePage()
|
|
class DriftArchivePage extends StatelessWidget {
|
|
const DriftArchivePage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ProviderScope(
|
|
overrides: [
|
|
timelineServiceProvider.overrideWith(
|
|
(ref) {
|
|
final user = ref.watch(currentUserProvider);
|
|
if (user == null) {
|
|
throw Exception('User must be logged in to access archive');
|
|
}
|
|
|
|
final timelineService =
|
|
ref.watch(timelineFactoryProvider).archive(user.id);
|
|
ref.onDispose(timelineService.dispose);
|
|
return timelineService;
|
|
},
|
|
),
|
|
],
|
|
child: const Timeline(),
|
|
);
|
|
}
|
|
}
|