From 4cdf55e7dda8bc7b6b985657db834358837b5dcf Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 13 Jan 2022 21:49:01 +0100 Subject: [PATCH] Prevent Alerts to be displayed in the automatically displayed analytics opt-in screen (#4933) --- changelog.d/4948.bugfix | 1 + .../main/java/im/vector/app/features/popup/PopupAlertManager.kt | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 changelog.d/4948.bugfix diff --git a/changelog.d/4948.bugfix b/changelog.d/4948.bugfix new file mode 100644 index 0000000000..da4b0a2500 --- /dev/null +++ b/changelog.d/4948.bugfix @@ -0,0 +1 @@ +Prevent Alerts to be displayed in the automatically displayed analytics opt-in screen \ No newline at end of file diff --git a/vector/src/main/java/im/vector/app/features/popup/PopupAlertManager.kt b/vector/src/main/java/im/vector/app/features/popup/PopupAlertManager.kt index 22bbabf9e3..ae03b5345a 100644 --- a/vector/src/main/java/im/vector/app/features/popup/PopupAlertManager.kt +++ b/vector/src/main/java/im/vector/app/features/popup/PopupAlertManager.kt @@ -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) }