mirror of
https://github.com/immich-app/immich.git
synced 2025-12-17 01:11:13 +03:00
feat: show "appears in" albums on asset viewer bottom sheet (#21925)
* 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>
This commit is contained in:
@@ -303,7 +303,7 @@ class AppRouter extends RootStackRouter {
|
||||
AutoRoute(page: DriftBackupAlbumSelectionRoute.page, guards: [_authGuard, _duplicateGuard]),
|
||||
AutoRoute(page: LocalTimelineRoute.page, guards: [_authGuard, _duplicateGuard]),
|
||||
AutoRoute(page: MainTimelineRoute.page, guards: [_authGuard, _duplicateGuard]),
|
||||
AutoRoute(page: RemoteAlbumRoute.page, guards: [_authGuard, _duplicateGuard]),
|
||||
AutoRoute(page: RemoteAlbumRoute.page, guards: [_authGuard]),
|
||||
AutoRoute(
|
||||
page: AssetViewerRoute.page,
|
||||
guards: [_authGuard, _duplicateGuard],
|
||||
|
||||
@@ -448,6 +448,7 @@ class AssetViewerRoute extends PageRouteInfo<AssetViewerRouteArgs> {
|
||||
required int initialIndex,
|
||||
required TimelineService timelineService,
|
||||
int? heroOffset,
|
||||
RemoteAlbum? currentAlbum,
|
||||
List<PageRouteInfo>? children,
|
||||
}) : super(
|
||||
AssetViewerRoute.name,
|
||||
@@ -456,6 +457,7 @@ class AssetViewerRoute extends PageRouteInfo<AssetViewerRouteArgs> {
|
||||
initialIndex: initialIndex,
|
||||
timelineService: timelineService,
|
||||
heroOffset: heroOffset,
|
||||
currentAlbum: currentAlbum,
|
||||
),
|
||||
initialChildren: children,
|
||||
);
|
||||
@@ -471,6 +473,7 @@ class AssetViewerRoute extends PageRouteInfo<AssetViewerRouteArgs> {
|
||||
initialIndex: args.initialIndex,
|
||||
timelineService: args.timelineService,
|
||||
heroOffset: args.heroOffset,
|
||||
currentAlbum: args.currentAlbum,
|
||||
);
|
||||
},
|
||||
);
|
||||
@@ -482,6 +485,7 @@ class AssetViewerRouteArgs {
|
||||
required this.initialIndex,
|
||||
required this.timelineService,
|
||||
this.heroOffset,
|
||||
this.currentAlbum,
|
||||
});
|
||||
|
||||
final Key? key;
|
||||
@@ -492,9 +496,11 @@ class AssetViewerRouteArgs {
|
||||
|
||||
final int? heroOffset;
|
||||
|
||||
final RemoteAlbum? currentAlbum;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'AssetViewerRouteArgs{key: $key, initialIndex: $initialIndex, timelineService: $timelineService, heroOffset: $heroOffset}';
|
||||
return 'AssetViewerRouteArgs{key: $key, initialIndex: $initialIndex, timelineService: $timelineService, heroOffset: $heroOffset, currentAlbum: $currentAlbum}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -706,36 +712,78 @@ class DownloadInfoRoute extends PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [DriftActivitiesPage]
|
||||
class DriftActivitiesRoute extends PageRouteInfo<void> {
|
||||
const DriftActivitiesRoute({List<PageRouteInfo>? children})
|
||||
: super(DriftActivitiesRoute.name, initialChildren: children);
|
||||
class DriftActivitiesRoute extends PageRouteInfo<DriftActivitiesRouteArgs> {
|
||||
DriftActivitiesRoute({
|
||||
Key? key,
|
||||
required RemoteAlbum album,
|
||||
List<PageRouteInfo>? children,
|
||||
}) : super(
|
||||
DriftActivitiesRoute.name,
|
||||
args: DriftActivitiesRouteArgs(key: key, album: album),
|
||||
initialChildren: children,
|
||||
);
|
||||
|
||||
static const String name = 'DriftActivitiesRoute';
|
||||
|
||||
static PageInfo page = PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const DriftActivitiesPage();
|
||||
final args = data.argsAs<DriftActivitiesRouteArgs>();
|
||||
return DriftActivitiesPage(key: args.key, album: args.album);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
class DriftActivitiesRouteArgs {
|
||||
const DriftActivitiesRouteArgs({this.key, required this.album});
|
||||
|
||||
final Key? key;
|
||||
|
||||
final RemoteAlbum album;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'DriftActivitiesRouteArgs{key: $key, album: $album}';
|
||||
}
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [DriftAlbumOptionsPage]
|
||||
class DriftAlbumOptionsRoute extends PageRouteInfo<void> {
|
||||
const DriftAlbumOptionsRoute({List<PageRouteInfo>? children})
|
||||
: super(DriftAlbumOptionsRoute.name, initialChildren: children);
|
||||
class DriftAlbumOptionsRoute extends PageRouteInfo<DriftAlbumOptionsRouteArgs> {
|
||||
DriftAlbumOptionsRoute({
|
||||
Key? key,
|
||||
required RemoteAlbum album,
|
||||
List<PageRouteInfo>? children,
|
||||
}) : super(
|
||||
DriftAlbumOptionsRoute.name,
|
||||
args: DriftAlbumOptionsRouteArgs(key: key, album: album),
|
||||
initialChildren: children,
|
||||
);
|
||||
|
||||
static const String name = 'DriftAlbumOptionsRoute';
|
||||
|
||||
static PageInfo page = PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const DriftAlbumOptionsPage();
|
||||
final args = data.argsAs<DriftAlbumOptionsRouteArgs>();
|
||||
return DriftAlbumOptionsPage(key: args.key, album: args.album);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
class DriftAlbumOptionsRouteArgs {
|
||||
const DriftAlbumOptionsRouteArgs({this.key, required this.album});
|
||||
|
||||
final Key? key;
|
||||
|
||||
final RemoteAlbum album;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'DriftAlbumOptionsRouteArgs{key: $key, album: $album}';
|
||||
}
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [DriftAlbumsPage]
|
||||
class DriftAlbumsRoute extends PageRouteInfo<void> {
|
||||
|
||||
Reference in New Issue
Block a user