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:
Brandon Wees
2025-10-28 11:52:01 -05:00
committed by GitHub
parent 74f2c10a5a
commit e0c2cdddd4
19 changed files with 401 additions and 212 deletions

View File

@@ -10,7 +10,6 @@ import 'package:immich_mobile/providers/album/current_album.provider.dart';
import 'package:immich_mobile/providers/asset_viewer/current_asset.provider.dart';
import 'package:immich_mobile/providers/infrastructure/album.provider.dart';
import 'package:immich_mobile/providers/infrastructure/asset.provider.dart' as beta_asset_provider;
import 'package:immich_mobile/providers/infrastructure/current_album.provider.dart';
import 'package:immich_mobile/providers/infrastructure/memory.provider.dart';
import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart';
import 'package:immich_mobile/routing/router.dart';
@@ -29,7 +28,6 @@ final deepLinkServiceProvider = Provider(
// Below is used for beta timeline
ref.watch(timelineFactoryProvider),
ref.watch(beta_asset_provider.assetServiceProvider),
ref.watch(currentRemoteAlbumProvider.notifier),
ref.watch(remoteAlbumServiceProvider),
ref.watch(driftMemoryServiceProvider),
),
@@ -46,7 +44,6 @@ class DeepLinkService {
/// Used for beta timeline
final TimelineFactory _betaTimelineFactory;
final beta_asset_service.AssetService _betaAssetService;
final CurrentAlbumNotifier _betaCurrentAlbumNotifier;
final RemoteAlbumService _betaRemoteAlbumService;
final DriftMemoryService _betaMemoryServiceProvider;
@@ -58,7 +55,6 @@ class DeepLinkService {
this._currentAlbum,
this._betaTimelineFactory,
this._betaAssetService,
this._betaCurrentAlbumNotifier,
this._betaRemoteAlbumService,
this._betaMemoryServiceProvider,
);
@@ -176,7 +172,6 @@ class DeepLinkService {
return null;
}
_betaCurrentAlbumNotifier.setAlbum(album);
return RemoteAlbumRoute(album: album);
} else {
// TODO: Remove this when beta is default