Skip to content

Commit 31ec8d3

Browse files
author
yostyle
committed
Open url on external browser task
1 parent c22d3fb commit 31ec8d3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

vector/src/main/java/im/vector/app/core/utils/ExternalApplicationsUtil.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ fun openUrlInExternalBrowser(context: Context, url: String?) {
7676
fun openUrlInExternalBrowser(context: Context, uri: Uri?) {
7777
uri?.let {
7878
val browserIntent = Intent(Intent.ACTION_VIEW, it).apply {
79+
// Open activity on browser task and not on element task
80+
flags = Intent.FLAG_ACTIVITY_NEW_TASK
7981
putExtra(Browser.EXTRA_APPLICATION_ID, context.packageName)
8082
putExtra(Browser.EXTRA_CREATE_NEW_TAB, true)
8183
}

0 commit comments

Comments
 (0)