mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-04-27 02:14:45 +00:00
Fix #1585
This commit is contained in:
parent
cc32845134
commit
7efd8ed7cb
2 changed files with 29 additions and 25 deletions
|
@ -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) {
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue