mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +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")
|
print("updating invidious token")
|
||||||
let sid = String(cookies[substringRange])
|
let sid = String(cookies[substringRange])
|
||||||
AccountsModel.setToken(self.account, sid)
|
AccountsModel.setToken(self.account, sid)
|
||||||
self.configure()
|
self.objectWillChange.send()
|
||||||
} else {
|
} else {
|
||||||
presentTokenUpdateFailedAlert(nil, "Could not extract SID from received cookies: \(cookies)")
|
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 {
|
} else if !token.isEmpty {
|
||||||
AccountsModel.setToken(self.account, token)
|
AccountsModel.setToken(self.account, token)
|
||||||
|
self.objectWillChange.send()
|
||||||
} else {
|
} else {
|
||||||
NavigationModel.shared.presentAlert(
|
NavigationModel.shared.presentAlert(
|
||||||
title: "Account Error",
|
title: "Account Error",
|
||||||
|
Loading…
Reference in New Issue
Block a user