Skip to content

Commit

Permalink
Fix link not opening in Chrome If private tabs setting is on without …
Browse files Browse the repository at this point in the history
…CustomTab being on (#1234)

* Fix link not opening in Chrome If private tabs setting is on without CustomTab being on

* Fix
  • Loading branch information
MV-GH authored Sep 15, 2023
1 parent d8876c1 commit 680a0e6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/src/main/java/com/jerboa/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,10 @@ suspend fun openLink(url: String, navController: NavController, useCustomTab: Bo
fun openLinkRaw(url: String, navController: NavController, useCustomTab: Boolean, usePrivateTab: Boolean) {
val extras = Intent().apply {
if (usePrivateTab) {
putExtra("com.google.android.apps.chrome.EXTRA_OPEN_NEW_INCOGNITO_TAB", true)
// In non CustomTab mode this causes it to not open the link in Chrome
if (useCustomTab) {
putExtra("com.google.android.apps.chrome.EXTRA_OPEN_NEW_INCOGNITO_TAB", true)
}
putExtra("private_browsing_mode", true)
}
}
Expand Down

0 comments on commit 680a0e6

Please sign in to comment.