... |
... |
@@ -50,6 +50,7 @@ import org.mozilla.fenix.compose.Divider |
50
|
50
|
import org.mozilla.fenix.compose.MenuItem
|
51
|
51
|
import org.mozilla.fenix.compose.TabCounter
|
52
|
52
|
import org.mozilla.fenix.compose.annotation.LightDarkPreview
|
|
53
|
+import org.mozilla.fenix.ext.settings
|
53
|
54
|
import org.mozilla.fenix.tabstray.ext.getMenuItems
|
54
|
55
|
import org.mozilla.fenix.theme.FirefoxTheme
|
55
|
56
|
import kotlin.math.max
|
... |
... |
@@ -192,6 +193,7 @@ private fun TabPageBanner( |
192
|
193
|
onTabPageIndicatorClicked: (Page) -> Unit,
|
193
|
194
|
onDismissClick: () -> Unit,
|
194
|
195
|
) {
|
|
196
|
+ val shouldDisableNormalMode = LocalContext.current.settings().shouldDisableNormalMode
|
195
|
197
|
val selectedColor = FirefoxTheme.colors.iconActive
|
196
|
198
|
val inactiveColor = FirefoxTheme.colors.iconPrimaryInactive
|
197
|
199
|
var showMenu by remember { mutableStateOf(false) }
|
... |
... |
@@ -216,22 +218,24 @@ private fun TabPageBanner( |
216
|
218
|
) {
|
217
|
219
|
CompositionLocalProvider(LocalRippleTheme provides DisabledRippleTheme) {
|
218
|
220
|
TabRow(
|
219
|
|
- selectedTabIndex = selectedPage.ordinal,
|
|
221
|
+ selectedTabIndex = if (shouldDisableNormalMode) 0 else selectedPage.ordinal,
|
220
|
222
|
modifier = Modifier.fillMaxWidth(MAX_WIDTH_TAB_ROW_PERCENT),
|
221
|
223
|
backgroundColor = Color.Transparent,
|
222
|
224
|
contentColor = selectedColor,
|
223
|
225
|
divider = {},
|
224
|
226
|
) {
|
225
|
|
- Tab(
|
226
|
|
- selected = selectedPage == Page.NormalTabs,
|
227
|
|
- onClick = { onTabPageIndicatorClicked(Page.NormalTabs) },
|
228
|
|
- modifier = Modifier
|
229
|
|
- .fillMaxHeight()
|
230
|
|
- .testTag(TabsTrayTestTag.normalTabsPageButton),
|
231
|
|
- selectedContentColor = selectedColor,
|
232
|
|
- unselectedContentColor = inactiveColor,
|
233
|
|
- ) {
|
234
|
|
- TabCounter(tabCount = normalTabCount)
|
|
227
|
+ if (!shouldDisableNormalMode) {
|
|
228
|
+ Tab(
|
|
229
|
+ selected = selectedPage == Page.NormalTabs,
|
|
230
|
+ onClick = { onTabPageIndicatorClicked(Page.NormalTabs) },
|
|
231
|
+ modifier = Modifier
|
|
232
|
+ .fillMaxHeight()
|
|
233
|
+ .testTag(TabsTrayTestTag.normalTabsPageButton),
|
|
234
|
+ selectedContentColor = selectedColor,
|
|
235
|
+ unselectedContentColor = inactiveColor,
|
|
236
|
+ ) {
|
|
237
|
+ TabCounter(tabCount = normalTabCount)
|
|
238
|
+ }
|
235
|
239
|
}
|
236
|
240
|
|
237
|
241
|
Tab(
|
... |
... |
@@ -250,6 +254,7 @@ private fun TabPageBanner( |
250
|
254
|
unselectedContentColor = inactiveColor,
|
251
|
255
|
)
|
252
|
256
|
|
|
257
|
+/*
|
253
|
258
|
Tab(
|
254
|
259
|
selected = selectedPage == Page.SyncedTabs,
|
255
|
260
|
onClick = { onTabPageIndicatorClicked(Page.SyncedTabs) },
|
... |
... |
@@ -265,6 +270,7 @@ private fun TabPageBanner( |
265
|
270
|
selectedContentColor = selectedColor,
|
266
|
271
|
unselectedContentColor = inactiveColor,
|
267
|
272
|
)
|
|
273
|
+*/
|
268
|
274
|
}
|
269
|
275
|
}
|
270
|
276
|
|