Skip to content

Commit d178c52

Browse files
authored
fix: cold start deep link logic (#19859)
1 parent 55fe67d commit d178c52

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

mobile/lib/main.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,13 @@ class ImmichAppState extends ConsumerState<ImmichApp>
176176
final deepLinkHandler = ref.read(deepLinkServiceProvider);
177177
final currentRouteName = ref.read(currentRouteNameProvider.notifier).state;
178178

179+
final isColdStart =
180+
currentRouteName == null || currentRouteName == SplashScreenRoute.name;
181+
179182
if (deepLink.uri.scheme == "immich") {
180183
final proposedRoute = await deepLinkHandler.handleScheme(
181184
deepLink,
182-
currentRouteName == SplashScreenRoute.name,
185+
isColdStart,
183186
);
184187

185188
return proposedRoute;
@@ -188,7 +191,7 @@ class ImmichAppState extends ConsumerState<ImmichApp>
188191
if (deepLink.uri.host == "my.immich.app") {
189192
final proposedRoute = await deepLinkHandler.handleMyImmichApp(
190193
deepLink,
191-
currentRouteName == SplashScreenRoute.name,
194+
isColdStart,
192195
);
193196

194197
return proposedRoute;

0 commit comments

Comments
 (0)