Fix deep link and shortcuts.

User can now open app from shortcut even if it was already started.
This commit is contained in:
Sad Ellie 2023-02-09 17:38:30 +04:00
parent 7f664c21fd
commit f5e37aec16
2 changed files with 4 additions and 1 deletions

View File

@ -12,6 +12,7 @@
android:theme="@style/Theme.Unitto">
<activity
android:name=".MainActivity"
android:allowTaskReparenting="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

View File

@ -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()