Add open in app to main three dot menu (#18462)
This commit is contained in:
parent
f5a1a01e06
commit
b15c3ff864
|
@ -441,6 +441,19 @@ class DefaultToolbarMenu(
|
||||||
onItemTapped.invoke(ToolbarMenu.Item.CustomizeReaderView)
|
onItemTapped.invoke(ToolbarMenu.Item.CustomizeReaderView)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val openInApp = BrowserMenuHighlightableItem(
|
||||||
|
label = context.getString(R.string.browser_menu_open_app_link),
|
||||||
|
startImageResource = R.drawable.ic_open_in_app,
|
||||||
|
iconTintColorResource = primaryTextColor(),
|
||||||
|
highlight = BrowserMenuHighlight.LowPriority(
|
||||||
|
label = context.getString(R.string.browser_menu_open_app_link),
|
||||||
|
notificationTint = getColor(context, R.color.whats_new_notification_color)
|
||||||
|
),
|
||||||
|
isHighlighted = { !context.settings().openInAppOpened }
|
||||||
|
) {
|
||||||
|
onItemTapped.invoke(ToolbarMenu.Item.OpenInApp)
|
||||||
|
}
|
||||||
|
|
||||||
val reportSiteIssuePlaceholder = WebExtensionPlaceholderMenuItem(
|
val reportSiteIssuePlaceholder = WebExtensionPlaceholderMenuItem(
|
||||||
id = WebCompatReporterFeature.WEBCOMPAT_REPORTER_EXTENSION_ID
|
id = WebCompatReporterFeature.WEBCOMPAT_REPORTER_EXTENSION_ID
|
||||||
)
|
)
|
||||||
|
@ -500,6 +513,7 @@ class DefaultToolbarMenu(
|
||||||
findInPageItem,
|
findInPageItem,
|
||||||
desktopSiteItem,
|
desktopSiteItem,
|
||||||
customizeReaderView.apply { visible = ::shouldShowReaderViewCustomization },
|
customizeReaderView.apply { visible = ::shouldShowReaderViewCustomization },
|
||||||
|
openInApp.apply { visible = ::shouldShowOpenInApp },
|
||||||
reportSiteIssuePlaceholder,
|
reportSiteIssuePlaceholder,
|
||||||
BrowserMenuDivider(),
|
BrowserMenuDivider(),
|
||||||
addToHomeScreenItem.apply { visible = ::canAddToHomescreen },
|
addToHomeScreenItem.apply { visible = ::canAddToHomescreen },
|
||||||
|
|
Loading…
Reference in New Issue
Block a user