mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-26 06:54:32 +01:00
Fix logout
This commit is contained in:
parent
f73bac9ae7
commit
f55cadfbdd
@ -5,6 +5,7 @@ import Env
|
||||
import Models
|
||||
import SwiftUI
|
||||
import Timeline
|
||||
import Network
|
||||
|
||||
struct AccountSettingsView: View {
|
||||
@Environment(\.dismiss) private var dismiss
|
||||
@ -67,6 +68,8 @@ struct AccountSettingsView: View {
|
||||
Button(role: .destructive) {
|
||||
if let token = appAccount.oauthToken {
|
||||
Task {
|
||||
let client = Client(server: appAccount.server, oauthToken: token)
|
||||
await TimelineCache.shared.clearCache(for: client)
|
||||
if let sub = pushNotifications.subscriptions.first(where: { $0.account.token == token }) {
|
||||
await sub.deleteSubscription()
|
||||
}
|
||||
|
@ -78,6 +78,8 @@ struct SettingsTabs: View {
|
||||
let sub = pushNotifications.subscriptions.first(where: { $0.account.token == token })
|
||||
{
|
||||
Task {
|
||||
let client = Client(server: account.server, oauthToken: token)
|
||||
await TimelineCache.shared.clearCache(for: client)
|
||||
await sub.deleteSubscription()
|
||||
appAccountsManager.delete(account: account)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user