Skip to content

Commit 8834fc2

Browse files
authored
fix priority between visual design experiment and trackers experiment (#6054)
Task/Issue URL: https://app.asana.com/1/137249556945/project/1174433894299346/task/1210234873359130?focus=true ### Description This PR makes sure that the app is not crashing when two mutually exclusive experiments are somehow selected. ### Steps to test this PR _Fresh install_ - [x] Open the app and enable the visual design experiment alongside one of the variants of O-10 - [x] Settings / Experimental UI - [x] Restart the app - [x] Verify app is not crashing
1 parent 16f1de6 commit 8834fc2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

app/src/main/java/com/duckduckgo/app/browser/omnibar/OmnibarLayoutViewModel.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,12 @@ class OmnibarLayoutViewModel @Inject constructor(
623623
}
624624
viewModelScope.launch {
625625
when {
626+
visualDesignExperiment -> {
627+
command.send(
628+
Command.StartVisualDesignTrackersAnimation(decoration.entities),
629+
)
630+
}
631+
626632
senseOfProtectionExperiment.isUserEnrolledInModifiedControlCohortAndExperimentEnabled() -> {
627633
command.send(Command.StartExperimentVariant1Animation)
628634
}
@@ -633,12 +639,6 @@ class OmnibarLayoutViewModel @Inject constructor(
633639
)
634640
}
635641

636-
visualDesignExperiment -> {
637-
command.send(
638-
Command.StartVisualDesignTrackersAnimation(decoration.entities),
639-
)
640-
}
641-
642642
else -> {
643643
command.send(Command.StartTrackersAnimation(decoration.entities))
644644
}

0 commit comments

Comments
 (0)