mirror of
https://github.com/yattee/yattee.git
synced 2024-11-09 15:58:20 +00:00
Fix reloading account token
This commit is contained in:
parent
c24b561c13
commit
dfe3fb81ea
@ -226,10 +226,12 @@ final class InvidiousAPI: Service, ObservableObject, VideosAPI {
|
||||
print("updating invidious token")
|
||||
let sid = String(cookies[substringRange])
|
||||
AccountsModel.setToken(self.account, sid)
|
||||
self.configure()
|
||||
self.objectWillChange.send()
|
||||
} else {
|
||||
presentTokenUpdateFailedAlert(nil, "Could not extract SID from received cookies: \(cookies)")
|
||||
}
|
||||
|
||||
self.configure()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -131,6 +131,7 @@ final class PipedAPI: Service, ObservableObject, VideosAPI {
|
||||
)
|
||||
} else if !token.isEmpty {
|
||||
AccountsModel.setToken(self.account, token)
|
||||
self.objectWillChange.send()
|
||||
} else {
|
||||
NavigationModel.shared.presentAlert(
|
||||
title: "Account Error",
|
||||
|
Loading…
Reference in New Issue
Block a user