Prevent Alerts to be displayed in the automatically displayed analytics opt-in screen (#4933)

This commit is contained in:
Benoit Marty 2022-01-13 21:49:01 +01:00
parent 668fa0d859
commit 4cdf55e7dd
2 changed files with 3 additions and 0 deletions

1
changelog.d/4948.bugfix Normal file
View file

@ -0,0 +1 @@
Prevent Alerts to be displayed in the automatically displayed analytics opt-in screen

View file

@ -25,6 +25,7 @@ import com.tapadoo.alerter.Alerter
import im.vector.app.R
import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.core.utils.isAnimationDisabled
import im.vector.app.features.analytics.ui.consent.AnalyticsOptInActivity
import im.vector.app.features.pin.PinActivity
import im.vector.app.features.signout.hard.SignedOutActivity
import im.vector.app.features.themes.ThemeUtils
@ -300,6 +301,7 @@ class PopupAlertManager @Inject constructor() {
return alert != null &&
activity !is PinActivity &&
activity !is SignedOutActivity &&
activity !is AnalyticsOptInActivity &&
activity is VectorBaseActivity<*> &&
alert.shouldBeDisplayedIn.invoke(activity)
}