Deselect articles when switching selected feeds
This commit is contained in:
parent
0425bb8ae3
commit
2b0f6f4e77
@ -303,6 +303,9 @@ private extension TimelineModel {
|
||||
func replaceArticles(with unsortedArticles: Set<Article>) {
|
||||
articles = Array(unsortedArticles).sortedByDate(sortDirection ? .orderedDescending : .orderedAscending, groupByFeed: groupByFeed)
|
||||
rebuildTimelineItems()
|
||||
|
||||
selectedArticleIDs = Set<String>()
|
||||
selectedArticleID = nil
|
||||
// TODO: Update unread counts and other item done in didSet on AppKit
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ import SwiftUI
|
||||
struct TimelineView: View {
|
||||
|
||||
@EnvironmentObject private var timelineModel: TimelineModel
|
||||
@State var navigate = false
|
||||
@State var navigate = true
|
||||
|
||||
@ViewBuilder var body: some View {
|
||||
#if os(macOS)
|
||||
@ -43,9 +43,6 @@ struct TimelineView: View {
|
||||
TimelineItemView(timelineItem: timelineItem)
|
||||
}
|
||||
}
|
||||
.onChange(of: timelineModel.selectedArticleIDs) { ids in
|
||||
navigate = !ids.isEmpty
|
||||
}
|
||||
}
|
||||
.navigationTitle(Text(verbatim: timelineModel.nameForDisplay))
|
||||
#else
|
||||
|
Loading…
x
Reference in New Issue
Block a user