Skip to content

Commit

Permalink
Fix #1585
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimillian committed Sep 22, 2023
1 parent cc32845 commit 7efd8ed
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 25 deletions.
48 changes: 23 additions & 25 deletions IceCubesApp/App/IceCubesApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,34 +115,32 @@ struct IceCubesApp: App {
popToRootTab: $popToRootTab,
tabs: availableTabs)
{
GeometryReader { _ in
HStack(spacing: 0) {
ZStack {
if selectedTab == .profile {
ProfileTab(popToRootTab: $popToRootTab)
}
ForEach(availableTabs) { tab in
if tab == selectedTab || sideBarLoadedTabs.contains(tab) {
tab
.makeContentView(popToRootTab: $popToRootTab)
.opacity(tab == selectedTab ? 1 : 0)
.transition(.opacity)
.id("\(tab)\(appAccountsManager.currentAccount.id)")
.onAppear {
sideBarLoadedTabs.insert(tab)
}
} else {
EmptyView()
}
}
HStack(spacing: 0) {
ZStack {
if selectedTab == .profile {
ProfileTab(popToRootTab: $popToRootTab)
}
if appAccountsManager.currentClient.isAuth,
userPreferences.showiPadSecondaryColumn
{
Divider().edgesIgnoringSafeArea(.all)
notificationsSecondaryColumn
ForEach(availableTabs) { tab in
if tab == selectedTab || sideBarLoadedTabs.contains(tab) {
tab
.makeContentView(popToRootTab: $popToRootTab)
.opacity(tab == selectedTab ? 1 : 0)
.transition(.opacity)
.id("\(tab)\(appAccountsManager.currentAccount.id)")
.onAppear {
sideBarLoadedTabs.insert(tab)
}
} else {
EmptyView()
}
}
}
if appAccountsManager.currentClient.isAuth,
userPreferences.showiPadSecondaryColumn
{
Divider().edgesIgnoringSafeArea(.all)
notificationsSecondaryColumn
}
}
}.onChange(of: $appAccountsManager.currentAccount.id) {
sideBarLoadedTabs.removeAll()
Expand Down
6 changes: 6 additions & 0 deletions IceCubesApp/App/Tabs/Timeline/TimelineTab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ struct TimelineTab: View {
if client.isAuth, newValue == .home || newValue == .federated || newValue == .local {
lastTimelineFilter = newValue
}
switch newValue {
case .tagGroup:
break
default:
selectedTagGroup = nil
}
}
.withSafariRouter()
.environment(routerPath)
Expand Down

0 comments on commit 7efd8ed

Please sign in to comment.