mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-22 07:44:00 +01:00
Default pref: make sure to use app context
This commit is contained in:
parent
c2880a5832
commit
dc04d2848d
@ -26,6 +26,6 @@ object DefaultSharedPreferences {
|
||||
|
||||
fun getInstance(context: Context): SharedPreferences =
|
||||
INSTANCE ?: synchronized(this) {
|
||||
INSTANCE ?: PreferenceManager.getDefaultSharedPreferences(context).also { INSTANCE = it }
|
||||
INSTANCE ?: PreferenceManager.getDefaultSharedPreferences(context.applicationContext).also { INSTANCE = it }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user