mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-11 08:35:26 +00:00
Better viewId for some tabs
This commit is contained in:
parent
e84a57ed7f
commit
e5b6e79fa9
3 changed files with 7 additions and 3 deletions
|
@ -13,6 +13,7 @@ struct MessagesTab: View {
|
|||
@EnvironmentObject private var watcher: StreamWatcher
|
||||
@EnvironmentObject private var client: Client
|
||||
@EnvironmentObject private var currentAccount: CurrentAccount
|
||||
@EnvironmentObject private var appAccount: AppAccountsManager
|
||||
@StateObject private var routerPath = RouterPath()
|
||||
@Binding var popToRootTab: Tab
|
||||
|
||||
|
@ -29,7 +30,7 @@ struct MessagesTab: View {
|
|||
}
|
||||
}
|
||||
.toolbarBackground(theme.primaryBackgroundColor.opacity(0.50), for: .navigationBar)
|
||||
.id(currentAccount.account?.id)
|
||||
.id(appAccount.currentAccount.id)
|
||||
}
|
||||
.onChange(of: $popToRootTab.wrappedValue) { popToRootTab in
|
||||
if popToRootTab == .messages {
|
||||
|
|
|
@ -11,6 +11,7 @@ struct NotificationsTab: View {
|
|||
@EnvironmentObject private var theme: Theme
|
||||
@EnvironmentObject private var client: Client
|
||||
@EnvironmentObject private var watcher: StreamWatcher
|
||||
@EnvironmentObject private var appAccount: AppAccountsManager
|
||||
@EnvironmentObject private var currentAccount: CurrentAccount
|
||||
@EnvironmentObject private var userPreferences: UserPreferences
|
||||
@StateObject private var routerPath = RouterPath()
|
||||
|
@ -33,7 +34,7 @@ struct NotificationsTab: View {
|
|||
}
|
||||
}
|
||||
.toolbarBackground(theme.primaryBackgroundColor.opacity(0.50), for: .navigationBar)
|
||||
.id(currentAccount.account?.id)
|
||||
.id(appAccount.currentAccount.id)
|
||||
}
|
||||
.onAppear {
|
||||
routerPath.client = client
|
||||
|
|
|
@ -8,6 +8,7 @@ import SwiftUI
|
|||
import Timeline
|
||||
|
||||
struct TimelineTab: View {
|
||||
@EnvironmentObject private var appAccount: AppAccountsManager
|
||||
@EnvironmentObject private var theme: Theme
|
||||
@EnvironmentObject private var currentAccount: CurrentAccount
|
||||
@EnvironmentObject private var preferences: UserPreferences
|
||||
|
@ -36,7 +37,7 @@ struct TimelineTab: View {
|
|||
toolbarView
|
||||
}
|
||||
.toolbarBackground(theme.primaryBackgroundColor.opacity(0.50), for: .navigationBar)
|
||||
.id(currentAccount.account?.id)
|
||||
.id(appAccount.currentAccount.id)
|
||||
}
|
||||
.onAppear {
|
||||
routerPath.client = client
|
||||
|
@ -143,6 +144,7 @@ struct TimelineTab: View {
|
|||
if UIDevice.current.userInterfaceIdiom != .pad {
|
||||
ToolbarItem(placement: .navigationBarLeading) {
|
||||
AppAccountsSelectorView(routerPath: routerPath)
|
||||
.id(currentAccount.account?.id)
|
||||
}
|
||||
}
|
||||
statusEditorToolbarItem(routerPath: routerPath,
|
||||
|
|
Loading…
Reference in a new issue