From dc04d2848d194be2a2e380694d6469b006e5dcad Mon Sep 17 00:00:00 2001 From: ganfra Date: Tue, 8 Sep 2020 15:43:32 +0200 Subject: [PATCH] Default pref: make sure to use app context --- .../main/java/im/vector/app/core/di/DefaultSharedPreferences.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/core/di/DefaultSharedPreferences.kt b/vector/src/main/java/im/vector/app/core/di/DefaultSharedPreferences.kt index 745af3e16c..abee0cb2e7 100644 --- a/vector/src/main/java/im/vector/app/core/di/DefaultSharedPreferences.kt +++ b/vector/src/main/java/im/vector/app/core/di/DefaultSharedPreferences.kt @@ -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 } } }