mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-18 13:16:49 +00:00
Faster & Safer account switching on macOS
This commit is contained in:
parent
d737b429b4
commit
23cf2a3751
2 changed files with 5 additions and 2 deletions
|
@ -99,7 +99,8 @@ struct IceCubesApp: App {
|
|||
tab
|
||||
.makeContentView(popToRootTab: $popToRootTab)
|
||||
.opacity(tab == selectedTab ? 1 : 0)
|
||||
.id(tab)
|
||||
.transition(.opacity)
|
||||
.id("\(tab)\(appAccountsManager.currentAccount.id)")
|
||||
.onAppear {
|
||||
sideBarLoadedTabs.insert(tab)
|
||||
}
|
||||
|
@ -108,6 +109,8 @@ struct IceCubesApp: App {
|
|||
}
|
||||
}
|
||||
}
|
||||
}.onChange(of: $appAccountsManager.currentAccount.id) { _ in
|
||||
sideBarLoadedTabs.removeAll()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ struct TimelineTab: View {
|
|||
timeline = isAuth ? .home : .federated
|
||||
})
|
||||
.onChange(of: currentAccount.account?.id, perform: { _ in
|
||||
timeline = client.isAuth ? .home : .federated
|
||||
timeline = client.isAuth && canFilterTimeline ? .home : .federated
|
||||
})
|
||||
.onChange(of: $popToRootTab.wrappedValue) { popToRootTab in
|
||||
if popToRootTab == .timeline {
|
||||
|
|
Loading…
Reference in a new issue