mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-15 10:48:54 +03:00
Default pref: make sure to use app context
This commit is contained in:
parent
c2880a5832
commit
dc04d2848d
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue