mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-03-12 05:12:09 +00:00
Correctly save / restore any previously selected timeline on home tab
This commit is contained in:
parent
46d4f3c4f4
commit
717ef16628
1 changed files with 2 additions and 1 deletions
|
@ -27,6 +27,7 @@ struct TimelineTab: View {
|
||||||
|
|
||||||
@Query(sort: \LocalTimeline.creationDate, order: .reverse) var localTimelines: [LocalTimeline]
|
@Query(sort: \LocalTimeline.creationDate, order: .reverse) var localTimelines: [LocalTimeline]
|
||||||
@Query(sort: \TagGroup.creationDate, order: .reverse) var tagGroups: [TagGroup]
|
@Query(sort: \TagGroup.creationDate, order: .reverse) var tagGroups: [TagGroup]
|
||||||
|
|
||||||
@AppStorage("remote_local_timeline") var legacyLocalTimelines: [String] = []
|
@AppStorage("remote_local_timeline") var legacyLocalTimelines: [String] = []
|
||||||
@AppStorage("tag_groups") var legacyTagGroups: [LegacyTagGroup] = []
|
@AppStorage("tag_groups") var legacyTagGroups: [LegacyTagGroup] = []
|
||||||
|
|
||||||
|
@ -92,7 +93,7 @@ struct TimelineTab: View {
|
||||||
routerPath.path = []
|
routerPath.path = []
|
||||||
}
|
}
|
||||||
.onChange(of: timeline) { _, newValue in
|
.onChange(of: timeline) { _, newValue in
|
||||||
if client.isAuth, newValue == .home || newValue == .federated || newValue == .local {
|
if client.isAuth, canFilterTimeline {
|
||||||
lastTimelineFilter = newValue
|
lastTimelineFilter = newValue
|
||||||
}
|
}
|
||||||
switch newValue {
|
switch newValue {
|
||||||
|
|
Loading…
Reference in a new issue