From 717ef166284170e24bad26ab4b68725a1e6dad34 Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Mon, 25 Sep 2023 14:43:29 +0200 Subject: [PATCH] Correctly save / restore any previously selected timeline on home tab --- IceCubesApp/App/Tabs/Timeline/TimelineTab.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift b/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift index 1211f4ca..79dda870 100644 --- a/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift +++ b/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift @@ -27,6 +27,7 @@ struct TimelineTab: View { @Query(sort: \LocalTimeline.creationDate, order: .reverse) var localTimelines: [LocalTimeline] @Query(sort: \TagGroup.creationDate, order: .reverse) var tagGroups: [TagGroup] + @AppStorage("remote_local_timeline") var legacyLocalTimelines: [String] = [] @AppStorage("tag_groups") var legacyTagGroups: [LegacyTagGroup] = [] @@ -92,7 +93,7 @@ struct TimelineTab: View { routerPath.path = [] } .onChange(of: timeline) { _, newValue in - if client.isAuth, newValue == .home || newValue == .federated || newValue == .local { + if client.isAuth, canFilterTimeline { lastTimelineFilter = newValue } switch newValue {