mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 10:25:35 +03:00
Better safe than sorry. This popup should not show up on production version
This commit is contained in:
parent
c6b9dba041
commit
e5163ad9c3
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue