Skip to content

High performance self-hosted photo and video management solution.

fix: cold start deep link logic (#19859)

Brandon Weesd178c52ba60e
diff --git a/mobile/lib/main.dart b/mobile/lib/main.dart
index 1f18ecdf5a..1b63e303f7 100644
--- a/mobile/lib/main.dart
+++ b/mobile/lib/main.dart
@@ -176,10 +176,13 @@ class ImmichAppState extends ConsumerState<ImmichApp>
final deepLinkHandler = ref.read(deepLinkServiceProvider);
final currentRouteName = ref.read(currentRouteNameProvider.notifier).state;
+ final isColdStart =
+ currentRouteName == null || currentRouteName == SplashScreenRoute.name;
+
if (deepLink.uri.scheme == "immich") {
final proposedRoute = await deepLinkHandler.handleScheme(
deepLink,
- currentRouteName == SplashScreenRoute.name,
+ isColdStart,
);
return proposedRoute;
@@ -188,7 +191,7 @@ class ImmichAppState extends ConsumerState<ImmichApp>
if (deepLink.uri.host == "my.immich.app") {
final proposedRoute = await deepLinkHandler.handleMyImmichApp(
deepLink,
- currentRouteName == SplashScreenRoute.name,
+ isColdStart,
);
return proposedRoute;