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 {
|
private val menuItems by lazy {
|
||||||
listOf(
|
listOf(
|
||||||
SimpleBrowserMenuItem(
|
menuToolbar,
|
||||||
{
|
|
||||||
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)
|
|
||||||
),
|
|
||||||
|
|
||||||
BrowserMenuDivider(),
|
BrowserMenuDivider(),
|
||||||
|
|
||||||
|
BrowserMenuImageText(
|
||||||
|
context.getString(R.string.browser_menu_share),
|
||||||
|
R.drawable.mozac_ic_share
|
||||||
|
) {
|
||||||
|
onItemTapped.invoke(ToolbarMenu.Item.Share)
|
||||||
|
},
|
||||||
|
|
||||||
SimpleBrowserMenuItem(
|
SimpleBrowserMenuItem(
|
||||||
{
|
{
|
||||||
val appName = context.getString(R.string.app_name)
|
val appName = context.getString(R.string.app_name)
|
||||||
@ -115,14 +115,16 @@ class CustomTabToolbarMenu(
|
|||||||
onItemTapped.invoke(ToolbarMenu.Item.OpenInFenix)
|
onItemTapped.invoke(ToolbarMenu.Item.OpenInFenix)
|
||||||
},
|
},
|
||||||
|
|
||||||
BrowserMenuImageText(
|
BrowserMenuDivider(),
|
||||||
context.getString(R.string.browser_menu_share),
|
|
||||||
R.drawable.mozac_ic_share,
|
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)
|
DefaultThemeManager.resolveAttribute(R.attr.primaryText, context)
|
||||||
) {
|
)
|
||||||
onItemTapped.invoke(ToolbarMenu.Item.Share)
|
|
||||||
},
|
|
||||||
menuToolbar
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@ class CustomTabsIntegration(
|
|||||||
toolbar,
|
toolbar,
|
||||||
sessionId,
|
sessionId,
|
||||||
customTabToolbarMenu.menuBuilder,
|
customTabToolbarMenu.menuBuilder,
|
||||||
|
START_OF_MENU_ITEMS_INDEX,
|
||||||
closeListener = { activity?.finish() })
|
closeListener = { activity?.finish() })
|
||||||
|
|
||||||
override fun start() {
|
override fun start() {
|
||||||
@ -47,4 +48,8 @@ class CustomTabsIntegration(
|
|||||||
override fun onBackPressed(): Boolean {
|
override fun onBackPressed(): Boolean {
|
||||||
return feature.onBackPressed()
|
return feature.onBackPressed()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
const val START_OF_MENU_ITEMS_INDEX = 2
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user