From f5e37aec1638a575d3f9624ca0416aaa5c8a649d Mon Sep 17 00:00:00 2001 From: Sad Ellie Date: Thu, 9 Feb 2023 17:38:30 +0400 Subject: [PATCH] Fix deep link and shortcuts. User can now open app from shortcut even if it was already started. --- app/src/main/AndroidManifest.xml | 1 + .../unitto/feature/epoch/navigation/EpochNavigation.kt | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 91bd9859..2f6be48b 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -12,6 +12,7 @@ android:theme="@style/Theme.Unitto"> diff --git a/feature/epoch/src/main/java/com/sadellie/unitto/feature/epoch/navigation/EpochNavigation.kt b/feature/epoch/src/main/java/com/sadellie/unitto/feature/epoch/navigation/EpochNavigation.kt index da266927..c348d2f9 100644 --- a/feature/epoch/src/main/java/com/sadellie/unitto/feature/epoch/navigation/EpochNavigation.kt +++ b/feature/epoch/src/main/java/com/sadellie/unitto/feature/epoch/navigation/EpochNavigation.kt @@ -39,7 +39,9 @@ fun NavController.navigateToEpoch() { .setIntent( Intent( Intent.ACTION_VIEW, - Uri.parse("app://com.sadellie.unitto/$epochRoute") + Uri.parse("app://com.sadellie.unitto/$epochRoute"), + context, + context.javaClass ) ) .build()