@ -14,6 +14,7 @@ import mozilla.components.browser.menu.BrowserMenuBuilder
import mozilla.components.browser.menu.BrowserMenuHighlight
import mozilla.components.browser.menu.item.BrowserMenuDivider
import mozilla.components.browser.menu.item.BrowserMenuHighlightableItem
import mozilla.components.browser.menu.item.BrowserMenuHighlightableSwitch
import mozilla.components.browser.menu.item.BrowserMenuImageSwitch
import mozilla.components.browser.menu.item.BrowserMenuImageText
import mozilla.components.browser.menu.item.BrowserMenuItemToolbar
@ -277,10 +278,15 @@ class DefaultToolbarMenu(
onItemTapped . invoke ( ToolbarMenu . Item . Quit )
}
private val readerMode = BrowserMenu Imag eSwitch(
private val readerMode = BrowserMenu Highlightabl eSwitch(
label = context . getString ( R . string . browser _menu _read ) ,
imageResource = R . drawable . ic _readermode ,
initialState = readerModeStateProvider
startImageResource = R . drawable . ic _readermode ,
initialState = readerModeStateProvider ,
highlight = BrowserMenuHighlight . LowPriority (
label = context . getString ( R . string . browser _menu _read ) ,
notificationTint = getColor ( context , R . color . whats _new _notification _color )
) ,
isHighlighted = { true }
) { checked ->
onItemTapped . invoke ( ToolbarMenu . Item . ReaderMode ( checked ) )
}
@ -293,10 +299,15 @@ class DefaultToolbarMenu(
onItemTapped . invoke ( ToolbarMenu . Item . ReaderModeAppearance )
}
private val openInApp = BrowserMenu ImageText (
private val openInApp = BrowserMenu HighlightableItem (
label = context . getString ( R . string . browser _menu _open _app _link ) ,
imageResource = R . drawable . ic _app _links ,
iconTintColorResource = primaryTextColor ( )
startImageResource = R . drawable . ic _app _links ,
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 = { true }
) {
onItemTapped . invoke ( ToolbarMenu . Item . OpenInApp )
}