Skip to content

Commit 4149a1d

Browse files
committed
hide magnifying glass animation when dismissing or showing next dialog
1 parent 3632360 commit 4149a1d

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3164,8 +3164,10 @@ class BrowserTabFragment :
31643164
daxBubbleCta.hideDaxBubbleCta(binding)
31653165
hideDaxBubbleCta()
31663166
if (onboardingDesignExperimentManager.isBuckEnrolledAndEnabled()) {
3167-
if (daxBubbleCta is DaxBubbleCta.DaxEndCta) {
3168-
hideBuckEndAnimation()
3167+
when(daxBubbleCta) {
3168+
is DaxBubbleCta.DaxIntroSearchOptionsCta -> hideBuckMagnifyingGlassAnimation()
3169+
is DaxBubbleCta.DaxEndCta -> hideBuckEndAnimation()
3170+
else -> Unit
31693171
}
31703172
}
31713173
renderer.showNewTab()
@@ -4510,12 +4512,15 @@ class BrowserTabFragment :
45104512
}
45114513

45124514
if (onboardingDesignExperimentManager.isBuckEnrolledAndEnabled()) {
4513-
if (configuration is DaxIntroVisitSiteOptionsCta && context?.resources?.getBoolean(R.bool.show_wing_animation) == true) {
4514-
lifecycleScope.launch {
4515-
with(newBrowserTab.wingAnimation) {
4516-
delay(2.5.seconds)
4517-
show()
4518-
playAnimation()
4515+
if (configuration is DaxIntroVisitSiteOptionsCta) {
4516+
hideBuckMagnifyingGlassAnimation()
4517+
if(context?.resources?.getBoolean(R.bool.show_wing_animation) == true) {
4518+
lifecycleScope.launch {
4519+
with(newBrowserTab.wingAnimation) {
4520+
delay(2.5.seconds)
4521+
show()
4522+
playAnimation()
4523+
}
45194524
}
45204525
}
45214526
}
@@ -4726,6 +4731,10 @@ class BrowserTabFragment :
47264731
}
47274732
}
47284733

4734+
private fun hideBuckMagnifyingGlassAnimation() {
4735+
newBrowserTab.buckMagnifyingGlassAnimation.isGone = true
4736+
}
4737+
47294738
private fun hideBuckEndAnimation() {
47304739
newBrowserTab.buckEndAnimation.isGone = true
47314740
val backgroundColor = requireActivity().getColorFromAttr(attrColor = CommonR.attr.daxColorBackground)

0 commit comments

Comments
 (0)