Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,26 @@ class AccountServiceImpl
.await()

currentUser?.delete()?.await()
auth.signOut()

context
.getSharedPreferences("user_preferences", Context.MODE_PRIVATE)
.edit {
clear()
}

context
.getSharedPreferences(USER_PREFERENCES_KEY, Context.MODE_PRIVATE)
.edit {
clear()
}

context
.getSharedPreferences(FRESH_KEEPER_PREFS_KEY, Context.MODE_PRIVATE)
.edit {
clear()
}

Copy link

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The preference clearing logic is duplicated for both shared preferences. Consider extracting this into a helper method that accepts the preference name as a parameter to reduce code duplication.

Suggested change
clearPreferences("user_preferences")
clearPreferences("FreshKeeperPrefs")

Copilot uses AI. Check for mistakes.
signOut()
}
} catch (e: FirebaseAuthRecentLoginRequiredException) {
Log.e("AccountServiceImpl", "User needs to reauthenticate", e)
Expand Down
Loading