From 363164d96dfd0f1cfe91e2efd73c7d39efcd6d72 Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Tue, 14 Feb 2023 14:27:29 +0100 Subject: [PATCH] Bind tabs to client.id --- IceCubesApp/App/Tabs/ExploreTab.swift | 2 +- IceCubesApp/App/Tabs/MessagesTab.swift | 2 +- IceCubesApp/App/Tabs/NotificationTab.swift | 2 +- IceCubesApp/App/Tabs/ProfileTab.swift | 2 +- IceCubesApp/App/Tabs/Timeline/TimelineTab.swift | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/IceCubesApp/App/Tabs/ExploreTab.swift b/IceCubesApp/App/Tabs/ExploreTab.swift index cd49d95d..8a337e3e 100644 --- a/IceCubesApp/App/Tabs/ExploreTab.swift +++ b/IceCubesApp/App/Tabs/ExploreTab.swift @@ -38,7 +38,7 @@ struct ExploreTab: View { routerPath.path = [] } } - .onChange(of: currentAccount.account?.id) { _ in + .onChange(of: client.id) { _ in routerPath.path = [] } .onAppear { diff --git a/IceCubesApp/App/Tabs/MessagesTab.swift b/IceCubesApp/App/Tabs/MessagesTab.swift index 52702a92..70efee17 100644 --- a/IceCubesApp/App/Tabs/MessagesTab.swift +++ b/IceCubesApp/App/Tabs/MessagesTab.swift @@ -37,7 +37,7 @@ struct MessagesTab: View { routerPath.path = [] } } - .onChange(of: currentAccount.account?.id) { _ in + .onChange(of: client.id) { _ in routerPath.path = [] } .onAppear { diff --git a/IceCubesApp/App/Tabs/NotificationTab.swift b/IceCubesApp/App/Tabs/NotificationTab.swift index 0d9008e2..ae1cd881 100644 --- a/IceCubesApp/App/Tabs/NotificationTab.swift +++ b/IceCubesApp/App/Tabs/NotificationTab.swift @@ -79,7 +79,7 @@ struct NotificationsTab: View { break } }) - .onChange(of: currentAccount.account?.id) { _ in + .onChange(of: client.id) { _ in routerPath.path = [] } } diff --git a/IceCubesApp/App/Tabs/ProfileTab.swift b/IceCubesApp/App/Tabs/ProfileTab.swift index f4fb318a..4f72b2b2 100644 --- a/IceCubesApp/App/Tabs/ProfileTab.swift +++ b/IceCubesApp/App/Tabs/ProfileTab.swift @@ -34,7 +34,7 @@ struct ProfileTab: View { routerPath.path = [] } } - .onChange(of: currentAccount.account?.id) { _ in + .onChange(of: client.id) { _ in routerPath.path = [] } .onAppear { diff --git a/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift b/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift index a886682d..64f3bd8a 100644 --- a/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift +++ b/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift @@ -81,7 +81,7 @@ struct TimelineTab: View { } } } - .onChange(of: currentAccount.account?.id) { _ in + .onChange(of: client.id) { _ in routerPath.path = [] } .onChange(of: timeline) { timeline in