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,
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)
}
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
}
}
if appAccountsManager.currentClient.isAuth,
userPreferences.showiPadSecondaryColumn
{
Divider().edgesIgnoringSafeArea(.all)
notificationsSecondaryColumn
}
}
}.onChange(of: $appAccountsManager.currentAccount.id) {

View File

@ -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)