For #15535: hasOpenTabs now considers the selected tab mode in tray tab.
This commit is contained in:
parent
cd6ab45119
commit
19b377c021
|
@ -213,9 +213,15 @@ class TabTrayView(
|
||||||
|
|
||||||
tabTrayItemMenu =
|
tabTrayItemMenu =
|
||||||
TabTrayItemMenu(
|
TabTrayItemMenu(
|
||||||
view.context,
|
context = view.context,
|
||||||
{ tabs.isNotEmpty() && view.tab_layout.selectedTabPosition == 0 },
|
shouldShowSaveToCollection = { tabs.isNotEmpty() && view.tab_layout.selectedTabPosition == 0 },
|
||||||
{ tabs.isNotEmpty() }) {
|
hasOpenTabs = {
|
||||||
|
if (isPrivateModeSelected) {
|
||||||
|
view.context.components.core.store.state.privateTabs.isNotEmpty()
|
||||||
|
} else {
|
||||||
|
view.context.components.core.store.state.normalTabs.isNotEmpty()
|
||||||
|
}
|
||||||
|
}) {
|
||||||
when (it) {
|
when (it) {
|
||||||
is TabTrayItemMenu.Item.ShareAllTabs -> interactor.onShareTabsClicked(
|
is TabTrayItemMenu.Item.ShareAllTabs -> interactor.onShareTabsClicked(
|
||||||
isPrivateModeSelected
|
isPrivateModeSelected
|
||||||
|
|
Loading…
Reference in New Issue
Block a user