mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-19 09:25:34 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/966 - Preserve CustomTab history when opening in browser
This commit is contained in:
parent
3307cf3205
commit
2d14e3416e
@ -8,7 +8,6 @@ import android.content.ClipData
|
||||
import android.content.ClipboardManager
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.LayoutInflater
|
||||
@ -655,9 +654,15 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
|
||||
}
|
||||
ToolbarMenu.Item.SaveToCollection -> showSaveToCollection()
|
||||
ToolbarMenu.Item.OpenInFenix -> {
|
||||
// To not get a "Display Already Acquired" error we need to force remove the engineView here
|
||||
browserLayout?.removeView(engineView as View)
|
||||
val intent = Intent(context, IntentReceiverActivity::class.java)
|
||||
intent.action = Intent.ACTION_VIEW
|
||||
intent.data = Uri.parse(getSessionById()?.url)
|
||||
getSessionById()?.customTabConfig = null
|
||||
getSessionById()?.let {
|
||||
requireComponents.core.sessionManager.select(it)
|
||||
}
|
||||
activity?.finish()
|
||||
startActivity(intent)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user