adding full refresh on login
This commit is contained in:
parent
17a7600a9d
commit
033412848a
@ -249,6 +249,16 @@ class LiveUser: ObservableObject {
|
||||
}
|
||||
}
|
||||
|
||||
func full_refresh() {
|
||||
self.isInitiallyRefreshingUser = true
|
||||
self.isInitiallyRefreshingPlaylists = true
|
||||
self.isInitiallyRefreshingTags = true
|
||||
|
||||
self.refresh_user()
|
||||
self.refresh_playlists()
|
||||
self.refresh_tags()
|
||||
}
|
||||
|
||||
func check_network_response(response: AFDataResponse<Any>) -> Bool {
|
||||
return NetworkHelper.check_network_response(response: response, onTokenFail: {
|
||||
self.logout()
|
||||
|
@ -109,6 +109,8 @@ struct LoginScreen: View {
|
||||
let token = json["token"].stringValue
|
||||
|
||||
keychain["jwt"] = token
|
||||
|
||||
self.liveUser.full_refresh()
|
||||
self.liveUser.loggedIn = true
|
||||
|
||||
Logger.net.info("login succeeded (\(code))")
|
||||
|
Loading…
Reference in New Issue
Block a user