Bug 1912953 - Remove mask badge on tabs counter in Focus r=android-reviewers,Roger
Differential Revision: https://phabricator.services.mozilla.com/D219203
This commit is contained in:
@@ -32,6 +32,7 @@ open class TabCounterToolbarButton(
|
||||
private val showTabs: () -> Unit,
|
||||
private val store: BrowserStore,
|
||||
private val menu: TabCounterMenu? = null,
|
||||
private val showMaskInPrivateMode: Boolean = true,
|
||||
) : Toolbar.Action {
|
||||
|
||||
private var reference = WeakReference<TabCounter>(null)
|
||||
@@ -71,7 +72,7 @@ open class TabCounterToolbarButton(
|
||||
|
||||
contentDescription = parent.context.getString(R.string.mozac_feature_tabs_toolbar_tabs_button)
|
||||
|
||||
toggleCounterMask(isPrivate(store))
|
||||
toggleCounterMask(showMaskInPrivateMode && isPrivate(store))
|
||||
}
|
||||
|
||||
// Set selectableItemBackgroundBorderless
|
||||
|
||||
@@ -90,6 +90,7 @@ class TabCounterToolbarButtonTest {
|
||||
showTabs = showTabs,
|
||||
store = BrowserStore(),
|
||||
menu = tabCounterMenu,
|
||||
showMaskInPrivateMode = false,
|
||||
),
|
||||
)
|
||||
|
||||
@@ -109,6 +110,7 @@ class TabCounterToolbarButtonTest {
|
||||
showTabs = showTabs,
|
||||
store = store,
|
||||
menu = tabCounterMenu,
|
||||
showMaskInPrivateMode = true,
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@@ -111,6 +111,7 @@ class BrowserToolbarIntegration(
|
||||
tabCounterListener.invoke()
|
||||
},
|
||||
store = store,
|
||||
showMaskInPrivateMode = false,
|
||||
)
|
||||
|
||||
@VisibleForTesting
|
||||
|
||||
Reference in New Issue
Block a user