2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-03 23:15:31 +00:00

Bug 1820897 - Disable the private theme from being used in the Composified Tabs Tray

This commit is contained in:
Noah Bond 2023-03-14 14:44:14 -07:00 committed by Ryan VanderMeulen
parent f884503a34
commit 9b1f3bdd97
2 changed files with 10 additions and 12 deletions

View File

@ -27,7 +27,6 @@ import mozilla.components.lib.state.ext.observeAsComposableState
import org.mozilla.fenix.compose.Divider
import org.mozilla.fenix.compose.annotation.LightDarkPreview
import org.mozilla.fenix.theme.FirefoxTheme
import org.mozilla.fenix.theme.Theme
/**
* Top-level UI for displaying the Tabs Tray feature.
@ -76,16 +75,14 @@ fun TabsTray(
) { position ->
when (Page.positionToPage(position)) {
Page.NormalTabs -> {
FirefoxTheme(theme = Theme.getTheme(allowPrivateTheme = false)) {
if (displayTabsInGrid) {
TabGrid(
tabs = normalTabs,
)
} else {
TabList(
tabs = normalTabs,
)
}
if (displayTabsInGrid) {
TabGrid(
tabs = normalTabs,
)
} else {
TabList(
tabs = normalTabs,
)
}
}
Page.PrivateTabs -> {

View File

@ -61,6 +61,7 @@ import org.mozilla.fenix.tabstray.ext.make
import org.mozilla.fenix.tabstray.ext.showWithTheme
import org.mozilla.fenix.tabstray.syncedtabs.SyncedTabsIntegration
import org.mozilla.fenix.theme.FirefoxTheme
import org.mozilla.fenix.theme.Theme
import org.mozilla.fenix.theme.ThemeManager
import org.mozilla.fenix.utils.allowUndo
import kotlin.math.max
@ -205,7 +206,7 @@ class TabsTrayFragment : AppCompatDialogFragment() {
)
tabsTrayComposeBinding.root.setContent {
FirefoxTheme {
FirefoxTheme(theme = Theme.getTheme(allowPrivateTheme = false)) {
TabsTray(
tabsTrayStore = tabsTrayStore,
displayTabsInGrid = requireContext().settings().gridTabView,