Skip to content

High performance self-hosted photo and video management solution.

fix(mobile): start the session when a link opens the app (#32181)

Santo Shakil26b8e3d40081
diff --git a/mobile/lib/main.dart b/mobile/lib/main.dart
index 21189783b6..82b49f83b5 100644
--- a/mobile/lib/main.dart
+++ b/mobile/lib/main.dart
@@ -215,6 +215,10 @@ class ImmichAppState extends ConsumerState<ImmichApp> with WidgetsBindingObserve
return DeepLink.none;
}
+ if (deepLink.initial) {
+ return DeepLink([SplashScreenRoute(deepLink: route)]);
+ }
+
return DeepLink([
// we need something to segue back to if the app was cold started
if (isColdStart) const TabShellRoute(children: [MainTimelineRoute()]),
diff --git a/mobile/lib/pages/common/splash_screen.page.dart b/mobile/lib/pages/common/splash_screen.page.dart
index 385dcdce26..d961341f39 100644
--- a/mobile/lib/pages/common/splash_screen.page.dart
+++ b/mobile/lib/pages/common/splash_screen.page.dart
@@ -274,7 +274,9 @@ class _ErrorCard extends StatelessWidget {
@RoutePage()
class SplashScreenPage extends StatefulHookConsumerWidget {
- const SplashScreenPage({super.key});
+ const SplashScreenPage({super.key, this.deepLink});
+
+ final PageRouteInfo? deepLink;
@override
SplashScreenPageState createState() => SplashScreenPageState();
@@ -371,10 +373,8 @@ class SplashScreenPageState extends ConsumerState<SplashScreenPage> {
return;
}
- // clean install - change the default of the flag
- // current install not using beta timeline
if (context.router.current.name == SplashScreenRoute.name) {
- unawaited(context.replaceRoute(const TabShellRoute()));
+ unawaited(context.router.replaceAll([const TabShellRoute(), ?widget.deepLink]));
}
}