Context: Launch MainActivity for opening custom tab action
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -58,11 +58,12 @@ fun Context.browse(url: String, showOpenInAuroraAction: Boolean = false) {
|
|||||||
if (showOpenInAuroraAction) {
|
if (showOpenInAuroraAction) {
|
||||||
val icon =
|
val icon =
|
||||||
ContextCompat.getDrawable(this, R.drawable.ic_open_in_new)?.toBitmap()
|
ContextCompat.getDrawable(this, R.drawable.ic_open_in_new)?.toBitmap()
|
||||||
val pendingIntent = NavDeepLinkBuilder(this)
|
val pendingIntent = PendingIntent.getActivity(
|
||||||
.setGraph(R.navigation.mobile_navigation)
|
this,
|
||||||
.setDestination(R.id.appDetailsFragment)
|
0,
|
||||||
.setComponentName(MainActivity::class.java)
|
Intent(this, MainActivity::class.java),
|
||||||
.createPendingIntent()
|
PendingIntent.FLAG_MUTABLE
|
||||||
|
)
|
||||||
customTabsIntent.setActionButton(
|
customTabsIntent.setActionButton(
|
||||||
icon!!,
|
icon!!,
|
||||||
this.getString(R.string.open_in_aurora),
|
this.getString(R.string.open_in_aurora),
|
||||||
|
|||||||
Reference in New Issue
Block a user