mirror of
https://github.com/immich-app/immich.git
synced 2026-03-10 03:43:43 -04:00
feat(mobile): album activity deep link (#23737)
* feat: add activity deep link support in DeepLinkService * test: add unit tests for DeepLinkService handling of activity deep links * Revert "test: add unit tests for DeepLinkService handling of activity deep links" This reverts commit 0b1914be9ad03c545fc5a32ee3aecd0181e4dca5.
This commit is contained in:
parent
2dc81e28fc
commit
337e3a8dac
@ -77,6 +77,7 @@ class DeepLinkService {
|
|||||||
"memory" => await _buildMemoryDeepLink(queryParams['id'] ?? ''),
|
"memory" => await _buildMemoryDeepLink(queryParams['id'] ?? ''),
|
||||||
"asset" => await _buildAssetDeepLink(queryParams['id'] ?? '', ref),
|
"asset" => await _buildAssetDeepLink(queryParams['id'] ?? '', ref),
|
||||||
"album" => await _buildAlbumDeepLink(queryParams['id'] ?? ''),
|
"album" => await _buildAlbumDeepLink(queryParams['id'] ?? ''),
|
||||||
|
"activity" => await _buildActivityDeepLink(queryParams['albumId'] ?? ''),
|
||||||
_ => null,
|
_ => null,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -185,4 +186,18 @@ class DeepLinkService {
|
|||||||
return AlbumViewerRoute(albumId: album.id);
|
return AlbumViewerRoute(albumId: album.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<PageRouteInfo?> _buildActivityDeepLink(String albumId) async {
|
||||||
|
if (Store.isBetaTimelineEnabled == false) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
final album = await _betaRemoteAlbumService.get(albumId);
|
||||||
|
|
||||||
|
if (album == null || album.isActivityEnabled == false) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return DriftActivitiesRoute(album: album);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user