Skip to content

Commit 09114fc

Browse files
committed
Tab manager update: Add a feature flag (#6372)
Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1210728360131191?focus=true ### Description This PR adds a new feature flag and caches its value in the `TabSwitcherViewModel`. ### Steps to test this PR QA-optional --- - To see the specific tasks where the Asana app for GitHub is being used, see below: - https://app.asana.com/0/0/1210760591708462
1 parent 407ddbb commit 09114fc

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

app/src/main/java/com/duckduckgo/app/tabs/TabFeatureFlags.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,7 @@ interface TabManagerFeatureFlags {
3636
@Toggle.DefaultValue(DefaultFeatureValue.TRUE)
3737
fun tabInsertionFixes(): Toggle
3838

39-
// There will be a new feature for the new design of tab manager
39+
@Toggle.InternalAlwaysEnabled
40+
@Toggle.DefaultValue(DefaultFeatureValue.FALSE)
41+
fun newToolbarFeature(): Toggle
4042
}

app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherViewModel.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ class TabSwitcherViewModel @Inject constructor(
166166
private val selectionMode: Selection
167167
get() = requireNotNull(selectionViewState.value.mode as Selection)
168168

169+
val isNewDesignEnabled: Boolean by lazy {
170+
tabManagerFeatureFlags.newToolbarFeature().isEnabled()
171+
}
172+
169173
sealed class Command {
170174
data object Close : Command()
171175
data class CloseAndShowUndoMessage(val deletedTabIds: List<String>) : Command()

0 commit comments

Comments
 (0)