This commit is contained in:
Thomas Ricouard 2023-09-22 22:41:06 +02:00
parent cc32845134
commit 7efd8ed7cb
2 changed files with 29 additions and 25 deletions

View file

@ -115,33 +115,31 @@ struct IceCubesApp: App {
popToRootTab: $popToRootTab, popToRootTab: $popToRootTab,
tabs: availableTabs) tabs: availableTabs)
{ {
GeometryReader { _ in HStack(spacing: 0) {
HStack(spacing: 0) { ZStack {
ZStack { if selectedTab == .profile {
if selectedTab == .profile { ProfileTab(popToRootTab: $popToRootTab)
ProfileTab(popToRootTab: $popToRootTab) }
} ForEach(availableTabs) { tab in
ForEach(availableTabs) { tab in if tab == selectedTab || sideBarLoadedTabs.contains(tab) {
if tab == selectedTab || sideBarLoadedTabs.contains(tab) { tab
tab .makeContentView(popToRootTab: $popToRootTab)
.makeContentView(popToRootTab: $popToRootTab) .opacity(tab == selectedTab ? 1 : 0)
.opacity(tab == selectedTab ? 1 : 0) .transition(.opacity)
.transition(.opacity) .id("\(tab)\(appAccountsManager.currentAccount.id)")
.id("\(tab)\(appAccountsManager.currentAccount.id)") .onAppear {
.onAppear { sideBarLoadedTabs.insert(tab)
sideBarLoadedTabs.insert(tab) }
} } else {
} else { EmptyView()
EmptyView()
}
} }
} }
if appAccountsManager.currentClient.isAuth, }
userPreferences.showiPadSecondaryColumn if appAccountsManager.currentClient.isAuth,
{ userPreferences.showiPadSecondaryColumn
Divider().edgesIgnoringSafeArea(.all) {
notificationsSecondaryColumn Divider().edgesIgnoringSafeArea(.all)
} notificationsSecondaryColumn
} }
} }
}.onChange(of: $appAccountsManager.currentAccount.id) { }.onChange(of: $appAccountsManager.currentAccount.id) {

View file

@ -95,6 +95,12 @@ struct TimelineTab: View {
if client.isAuth, newValue == .home || newValue == .federated || newValue == .local { if client.isAuth, newValue == .home || newValue == .federated || newValue == .local {
lastTimelineFilter = newValue lastTimelineFilter = newValue
} }
switch newValue {
case .tagGroup:
break
default:
selectedTagGroup = nil
}
} }
.withSafariRouter() .withSafariRouter()
.environment(routerPath) .environment(routerPath)