mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
chore: refactor show view in timeline button (#22894)
* chore: refactor show view in timeline button This refactor includes changes to notify asset viewer about where an asset was shown from. * chore: realized I could just pull from the timelineProvider instead of storing it in the asset viewer state * chore: rename enum to TimelineOrigin and update members * fix: update isOwner condition --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
parent
d778286777
commit
b484a52252
5 changed files with 60 additions and 17 deletions
|
|
@ -8,8 +8,8 @@ import 'package:immich_mobile/entities/store.entity.dart';
|
|||
import 'package:immich_mobile/presentation/widgets/asset_viewer/asset_viewer.page.dart';
|
||||
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/asset.provider.dart' as beta_asset_provider;
|
||||
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';
|
||||
|
|
@ -150,7 +150,10 @@ class DeepLinkService {
|
|||
}
|
||||
|
||||
AssetViewer.setAsset(ref, asset);
|
||||
return AssetViewerRoute(initialIndex: 0, timelineService: _betaTimelineFactory.fromAssets([asset]));
|
||||
return AssetViewerRoute(
|
||||
initialIndex: 0,
|
||||
timelineService: _betaTimelineFactory.fromAssets([asset], TimelineOrigin.deepLink),
|
||||
);
|
||||
} else {
|
||||
// TODO: Remove this when beta is default
|
||||
final asset = await _assetService.getAssetByRemoteId(assetId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue