mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-17 22:37:03 +05:30
Merge pull request #36 from msfjarvis/custom-tabs-update
This commit is contained in:
commit
78484de959
1 changed files with 1 additions and 8 deletions
|
@ -3,8 +3,6 @@ package dev.msfjarvis.lobsters.urllauncher
|
|||
import android.content.Context
|
||||
import android.net.Uri
|
||||
import androidx.browser.customtabs.CustomTabsIntent
|
||||
import saschpe.android.customtabs.CustomTabsHelper
|
||||
import saschpe.android.customtabs.WebViewFallback
|
||||
|
||||
class UrlLauncherImpl(private val context: Context) : UrlLauncher {
|
||||
override fun launch(url: String) {
|
||||
|
@ -12,11 +10,6 @@ class UrlLauncherImpl(private val context: Context) : UrlLauncher {
|
|||
.setShareState(CustomTabsIntent.SHARE_STATE_ON)
|
||||
.setShowTitle(true)
|
||||
.build()
|
||||
CustomTabsHelper.addKeepAliveExtra(context, customTabsIntent.intent)
|
||||
CustomTabsHelper.openCustomTab(
|
||||
context, customTabsIntent,
|
||||
Uri.parse(url),
|
||||
WebViewFallback()
|
||||
)
|
||||
customTabsIntent.launchUrl(context, Uri.parse(url))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue