mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
adapt to more pages
This commit is contained in:
parent
8987b2de17
commit
596a3bd689
17 changed files with 248 additions and 298 deletions
|
|
@ -1,14 +1,16 @@
|
|||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/domain/models/album/album.model.dart';
|
||||
import 'package:immich_mobile/presentation/widgets/timeline/timeline.widget.dart';
|
||||
import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart';
|
||||
import 'package:immich_mobile/widgets/common/mesmerizing_sliver_app_bar.dart';
|
||||
|
||||
@RoutePage()
|
||||
class RemoteTimelinePage extends StatelessWidget {
|
||||
final String albumId;
|
||||
final RemoteAlbum album;
|
||||
|
||||
const RemoteTimelinePage({super.key, required this.albumId});
|
||||
const RemoteTimelinePage({super.key, required this.album});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
@ -18,13 +20,18 @@ class RemoteTimelinePage extends StatelessWidget {
|
|||
(ref) {
|
||||
final timelineService = ref
|
||||
.watch(timelineFactoryProvider)
|
||||
.remoteAlbum(albumId: albumId);
|
||||
.remoteAlbum(albumId: album.id);
|
||||
ref.onDispose(timelineService.dispose);
|
||||
return timelineService;
|
||||
},
|
||||
),
|
||||
],
|
||||
child: const Timeline(),
|
||||
child: Timeline(
|
||||
appBar: MesmerizingSliverAppBar(
|
||||
title: album.name,
|
||||
icon: Icons.photo_album_outlined,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue