You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is best practice to have information about logged-in user in each ViewController ?
Do i have to call findCurrentUserWithSuccess each time or is there something like shared instance of logged-in user? Or must i implement my own disk cache logic?
From my knowledge (please correct me if I'm wrong), there is a exposed property on LBUserRepository called cachedCurrentUser, which is an instance of LBUser, and another exposed property called currentUserId, which is just a string. I used currentUserId in my app so I assume the cachedCurrentUser is doing what its name is implying. For me I only need to know the logged-in user ID in my view controllers so I have a singleton class which holds a LBUserRepository instance and all of my view controllers have knowledge of this singleton class.
I do not think you need a disk cache logic since I assume user is supposed to log-in in every session?
Hello.
What is best practice to have information about logged-in user in each ViewController ?
Do i have to call
findCurrentUserWithSuccess
each time or is there something like shared instance of logged-in user? Or must i implement my own disk cache logic?@hideya can you help me?
The text was updated successfully, but these errors were encountered: