mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 01:15:54 +03:00
Fix "Riot is now Element" dialog displayed by mistake, after a logout
This commit is contained in:
parent
fd4b56572d
commit
ea4e9b8e5e
2 changed files with 5 additions and 1 deletions
|
@ -28,7 +28,7 @@ import im.vector.app.features.settings.VectorSettingsUrls
|
|||
// Increase this value to show again the disclaimer dialog after an upgrade of the application
|
||||
private const val CURRENT_DISCLAIMER_VALUE = 2
|
||||
|
||||
private const val SHARED_PREF_KEY = "LAST_DISCLAIMER_VERSION_VALUE"
|
||||
const val SHARED_PREF_KEY = "LAST_DISCLAIMER_VERSION_VALUE"
|
||||
|
||||
fun showDisclaimerDialog(activity: Activity) {
|
||||
val sharedPrefs = DefaultSharedPreferences.getInstance(activity)
|
||||
|
|
|
@ -24,6 +24,7 @@ import com.squareup.seismic.ShakeDetector
|
|||
import im.vector.app.BuildConfig
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.di.DefaultSharedPreferences
|
||||
import im.vector.app.features.disclaimer.SHARED_PREF_KEY
|
||||
import im.vector.app.features.homeserver.ServerUrlsRepository
|
||||
import im.vector.app.features.themes.ThemeUtils
|
||||
import org.matrix.android.sdk.api.extensions.tryOrNull
|
||||
|
@ -248,6 +249,9 @@ class VectorPreferences @Inject constructor(private val context: Context) {
|
|||
// theme
|
||||
keysToKeep.add(ThemeUtils.APPLICATION_THEME_KEY)
|
||||
|
||||
// Disclaimer dialog
|
||||
keysToKeep.add(SHARED_PREF_KEY)
|
||||
|
||||
// get all the existing keys
|
||||
val keys = defaultPrefs.all.keys
|
||||
|
||||
|
|
Loading…
Reference in a new issue