Context: Launch MainActivity for opening custom tab action

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2023-08-21 10:05:33 +05:30
parent c8228f45cc
commit f3c56ca056

View File

@@ -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),