fix: 로그아웃시 UserDefaults에서 푸시토큰을 삭제하지 않도록 수정

This commit is contained in:
2025-05-17 21:59:28 +09:00
parent 0b9abf39f1
commit 8b8f5b80b8

View File

@@ -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) {