Merge pull request #4948 from vector-im/feature/bma/alerter_analytics_optin

Prevent Alerts to be displayed on the analytics opt-in screen
This commit is contained in:
Benoit Marty 2022-01-14 17:46:32 +01:00 committed by GitHub
commit 9232206947
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)
}