mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-11 13:11:01 +00:00
parent
11918d45f4
commit
4cd0d464a7
@ -91,17 +91,17 @@ class CustomTabToolbarMenu(
|
||||
|
||||
private val menuItems by lazy {
|
||||
listOf(
|
||||
SimpleBrowserMenuItem(
|
||||
{
|
||||
val appName = context.getString(R.string.app_name)
|
||||
context.getString(R.string.browser_menu_powered_by, appName).toUpperCase()
|
||||
}(),
|
||||
ToolbarMenu.CAPTION_TEXT_SIZE,
|
||||
DefaultThemeManager.resolveAttribute(R.attr.primaryText, context)
|
||||
),
|
||||
menuToolbar,
|
||||
|
||||
BrowserMenuDivider(),
|
||||
|
||||
BrowserMenuImageText(
|
||||
context.getString(R.string.browser_menu_share),
|
||||
R.drawable.mozac_ic_share
|
||||
) {
|
||||
onItemTapped.invoke(ToolbarMenu.Item.Share)
|
||||
},
|
||||
|
||||
SimpleBrowserMenuItem(
|
||||
{
|
||||
val appName = context.getString(R.string.app_name)
|
||||
@ -115,14 +115,16 @@ class CustomTabToolbarMenu(
|
||||
onItemTapped.invoke(ToolbarMenu.Item.OpenInFenix)
|
||||
},
|
||||
|
||||
BrowserMenuImageText(
|
||||
context.getString(R.string.browser_menu_share),
|
||||
R.drawable.mozac_ic_share,
|
||||
BrowserMenuDivider(),
|
||||
|
||||
SimpleBrowserMenuItem(
|
||||
{
|
||||
val appName = context.getString(R.string.app_name)
|
||||
context.getString(R.string.browser_menu_powered_by, appName).toUpperCase()
|
||||
}(),
|
||||
ToolbarMenu.CAPTION_TEXT_SIZE,
|
||||
DefaultThemeManager.resolveAttribute(R.attr.primaryText, context)
|
||||
) {
|
||||
onItemTapped.invoke(ToolbarMenu.Item.Share)
|
||||
},
|
||||
menuToolbar
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ class CustomTabsIntegration(
|
||||
toolbar,
|
||||
sessionId,
|
||||
customTabToolbarMenu.menuBuilder,
|
||||
START_OF_MENU_ITEMS_INDEX,
|
||||
closeListener = { activity?.finish() })
|
||||
|
||||
override fun start() {
|
||||
@ -47,4 +48,8 @@ class CustomTabsIntegration(
|
||||
override fun onBackPressed(): Boolean {
|
||||
return feature.onBackPressed()
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val START_OF_MENU_ITEMS_INDEX = 2
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user