Faster & Safer account switching on macOS
This commit is contained in:
parent
d737b429b4
commit
23cf2a3751
|
@ -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 New Issue