Fix timeline tag group filter

This commit is contained in:
Thomas Ricouard 2024-01-01 19:00:23 +01:00
parent bd51dfc0b6
commit e41dcd6976

View file

@ -94,8 +94,10 @@ struct TimelineTab: View {
lastTimelineFilter = newValue lastTimelineFilter = newValue
} }
switch newValue { switch newValue {
case .tagGroup: case let .tagGroup(title, _):
break if let group = tagGroups.first(where: { $0.title == title}) {
selectedTagGroup = group
}
default: default:
selectedTagGroup = nil selectedTagGroup = nil
} }
@ -295,7 +297,6 @@ struct TimelineTab: View {
Menu("timeline.filter.tag-groups") { Menu("timeline.filter.tag-groups") {
ForEach(tagGroups) { group in ForEach(tagGroups) { group in
Button { Button {
selectedTagGroup = group
timeline = .tagGroup(title: group.title, tags: group.tags) timeline = .tagGroup(title: group.title, tags: group.tags)
} label: { } label: {
VStack { VStack {