From 00847778f5b9f34968fcf7e92746df37dee6280b Mon Sep 17 00:00:00 2001 From: Shawn Date: Tue, 7 Nov 2023 17:38:09 -0700 Subject: [PATCH] Fix deeplink issue where dialogs would render on top of collections view --- ios/WonderousWidget/WonderousWidgetView.swift | 2 +- lib/router.dart | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ios/WonderousWidget/WonderousWidgetView.swift b/ios/WonderousWidget/WonderousWidgetView.swift index 775953cf..b0fa9809 100644 --- a/ios/WonderousWidget/WonderousWidgetView.swift +++ b/ios/WonderousWidget/WonderousWidgetView.swift @@ -63,7 +63,7 @@ struct WonderousWidgetView : View { content.padding(16) } .widgetBackground(Color.darkGrey) - .widgetURL(URL(string: "wonderous:///collection")) + .widgetURL(URL(string: "wonderous:///home/collection")) } } diff --git a/lib/router.dart b/lib/router.dart index f5e4f07c..0f3febde 100644 --- a/lib/router.dart +++ b/lib/router.dart @@ -39,7 +39,11 @@ final appRouter = GoRouter( }, routes: [ AppRoute(ScreenPaths.splash, (_) => Container(color: $styles.colors.greyStrong)), // This will be hidden - AppRoute(ScreenPaths.home, (_) => HomeScreen()), + AppRoute(ScreenPaths.home, (_) => HomeScreen(), routes: [ + AppRoute('collection', (s) { + return CollectionScreen(fromId: s.queryParams['id'] ?? ''); + }), + ]), AppRoute(ScreenPaths.intro, (_) => IntroScreen()), AppRoute('/wonder/:type', (s) { int tab = int.tryParse(s.queryParams['t'] ?? '') ?? 0;