Clear selected articles when selected feeds changes
This commit is contained in:
parent
5a267485c3
commit
bb1b7ad0b0
|
@ -147,6 +147,13 @@ private extension TimelineModel {
|
||||||
func subscribeToReadFilterAndFeedChanges() {
|
func subscribeToReadFilterAndFeedChanges() {
|
||||||
guard let selectedFeedsPublisher = delegate?.selectedFeedsPublisher else { return }
|
guard let selectedFeedsPublisher = delegate?.selectedFeedsPublisher else { return }
|
||||||
|
|
||||||
|
selectedFeedsPublisher
|
||||||
|
.sink { [weak self] _ in
|
||||||
|
self?.selectedTimelineItemIDs = Set<String>()
|
||||||
|
self?.selectedTimelineItemID = nil
|
||||||
|
}
|
||||||
|
.store(in: &cancellables)
|
||||||
|
|
||||||
let toggledReadFilterPublisher = changeReadFilterSubject
|
let toggledReadFilterPublisher = changeReadFilterSubject
|
||||||
.map { Optional($0) }
|
.map { Optional($0) }
|
||||||
.withLatestFrom(selectedFeedsPublisher, resultSelector: { ($1, $0) })
|
.withLatestFrom(selectedFeedsPublisher, resultSelector: { ($1, $0) })
|
||||||
|
|
Loading…
Reference in New Issue