fix: 로그아웃시 UserDefaults에서 푸시토큰을 삭제하지 않도록 수정
This commit is contained in:
@@ -27,7 +27,11 @@ object SharedPreferenceManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun clear() {
|
fun clear() {
|
||||||
sharedPreferences.edit { it.clear() }
|
sharedPreferences.edit { editor ->
|
||||||
|
sharedPreferences.all.keys
|
||||||
|
.filterNot { it == Constants.PREF_PUSH_TOKEN }
|
||||||
|
.forEach { editor.remove(it) }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private inline fun SharedPreferences.edit(operation: (SharedPreferences.Editor) -> Unit) {
|
private inline fun SharedPreferences.edit(operation: (SharedPreferences.Editor) -> Unit) {
|
||||||
|
|||||||
Reference in New Issue
Block a user