feat: add activity deep link support in DeepLinkService

pull/23737/head
idubnori 2025-11-07 09:30:17 +09:00
parent 2c50f2e244
commit 8d4904d120
1 changed files with 15 additions and 0 deletions

View File

@ -77,6 +77,7 @@ class DeepLinkService {
"memory" => await _buildMemoryDeepLink(queryParams['id'] ?? ''),
"asset" => await _buildAssetDeepLink(queryParams['id'] ?? '', ref),
"album" => await _buildAlbumDeepLink(queryParams['id'] ?? ''),
"activity" => await _buildActivityDeepLink(queryParams['albumId'] ?? ''),
_ => null,
};
@ -185,4 +186,18 @@ class DeepLinkService {
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);
}
}