From e5163ad9c31990ec2f2dbcc8c67f91909479c8f3 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 26 Jul 2022 11:56:27 +0200 Subject: [PATCH] Better safe than sorry. This popup should not show up on production version --- vector/src/gplay/java/im/vector/app/nightly/NightlyProxy.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vector/src/gplay/java/im/vector/app/nightly/NightlyProxy.kt b/vector/src/gplay/java/im/vector/app/nightly/NightlyProxy.kt index a16b1fb6dc..8f74c96470 100644 --- a/vector/src/gplay/java/im/vector/app/nightly/NightlyProxy.kt +++ b/vector/src/gplay/java/im/vector/app/nightly/NightlyProxy.kt @@ -20,6 +20,7 @@ import android.content.Context import androidx.core.content.edit import com.google.firebase.appdistribution.FirebaseAppDistribution import com.google.firebase.appdistribution.FirebaseAppDistributionException +import im.vector.app.BuildConfig import im.vector.app.core.di.DefaultSharedPreferences import im.vector.app.core.time.Clock import timber.log.Timber @@ -54,6 +55,7 @@ class NightlyProxy @Inject constructor( } private fun canDisplayPopup(): Boolean { + if (BuildConfig.APPLICATION_ID != "im.vector.app.nightly") return false val sharedPreferences = DefaultSharedPreferences.getInstance(context) val today = clock.epochMillis() / A_DAY_IN_MILLIS val lastDisplayPopupDay = sharedPreferences.getLong(SHARED_PREF_KEY, 0)