Skip to content

Commit

Permalink
fix: replace commit() with apply() to allow async saving of Shared Pr…
Browse files Browse the repository at this point in the history
…eferences
  • Loading branch information
rabiaq123 committed Dec 15, 2023
1 parent 27a5c1f commit 448fa5f
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ internal class DVCSharedPrefs(context: Context) {
fun saveString(value: String, key: String) {
try {
preferences.edit().putString(key, value).apply()
preferences.edit().commit()
} catch (e: JsonProcessingException) {
DevCycleLogger.e(e, e.message)
}
Expand Down

0 comments on commit 448fa5f

Please sign in to comment.