Ofir Bar
02/23/2020, 11:31 AMUser object from the Shared Preferences.
Here is the line of code I use:
private val mCurrentUser = Defaults[PrefsKeys.user]!!
So Defaults[PrefsKeys.user]!! returns the current User object stored in Shared Preference.
The issue is when I change the value in the Shared Preference, mCurrentUser is still the same User object.
Can I replace mCurrentUser to be an actual call to the SharedPreference? I guess I am trying to make something like an alias. Because calling Defaults[PrefKeys.user]!! everytime is not very readable.Tolriq
02/23/2020, 11:56 AMTolriq
02/23/2020, 11:57 AMOfir Bar
02/23/2020, 12:06 PM