diff --git a/IceCubesApp/App/Tabs/MessagesTab.swift b/IceCubesApp/App/Tabs/MessagesTab.swift index b2ad6cd7..715c54fd 100644 --- a/IceCubesApp/App/Tabs/MessagesTab.swift +++ b/IceCubesApp/App/Tabs/MessagesTab.swift @@ -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 { diff --git a/IceCubesApp/App/Tabs/NotificationTab.swift b/IceCubesApp/App/Tabs/NotificationTab.swift index 074ea9e4..defe9525 100644 --- a/IceCubesApp/App/Tabs/NotificationTab.swift +++ b/IceCubesApp/App/Tabs/NotificationTab.swift @@ -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 diff --git a/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift b/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift index 8e1b9a23..e432b2ec 100644 --- a/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift +++ b/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift @@ -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,