Moved title update to the correct func for subscription
This commit is contained in:
parent
bb1b7ad0b0
commit
2217dc492f
|
@ -147,6 +147,21 @@ private extension TimelineModel {
|
||||||
func subscribeToReadFilterAndFeedChanges() {
|
func subscribeToReadFilterAndFeedChanges() {
|
||||||
guard let selectedFeedsPublisher = delegate?.selectedFeedsPublisher else { return }
|
guard let selectedFeedsPublisher = delegate?.selectedFeedsPublisher else { return }
|
||||||
|
|
||||||
|
// Set the timeline name for display
|
||||||
|
selectedFeedsPublisher
|
||||||
|
.map { feeds -> String in
|
||||||
|
switch feeds.count {
|
||||||
|
case 0:
|
||||||
|
return ""
|
||||||
|
case 1:
|
||||||
|
return feeds.first!.nameForDisplay
|
||||||
|
default:
|
||||||
|
return NSLocalizedString("Multiple", comment: "Multiple")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.assign(to: &$nameForDisplay)
|
||||||
|
|
||||||
|
// Clear the selected timeline items when the selected feed(s) change
|
||||||
selectedFeedsPublisher
|
selectedFeedsPublisher
|
||||||
.sink { [weak self] _ in
|
.sink { [weak self] _ in
|
||||||
self?.selectedTimelineItemIDs = Set<String>()
|
self?.selectedTimelineItemIDs = Set<String>()
|
||||||
|
@ -193,8 +208,7 @@ private extension TimelineModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
func subscribeToArticleFetchChanges() {
|
func subscribeToArticleFetchChanges() {
|
||||||
guard let readFilterAndFeedsPublisher = readFilterAndFeedsPublisher,
|
guard let readFilterAndFeedsPublisher = readFilterAndFeedsPublisher else { return }
|
||||||
let selectedFeedsPublisher = delegate?.selectedFeedsPublisher else { return }
|
|
||||||
|
|
||||||
let sortDirectionPublisher = sortDirectionSubject.removeDuplicates()
|
let sortDirectionPublisher = sortDirectionSubject.removeDuplicates()
|
||||||
let groupByPublisher = groupByFeedSubject.removeDuplicates()
|
let groupByPublisher = groupByFeedSubject.removeDuplicates()
|
||||||
|
@ -225,19 +239,6 @@ private extension TimelineModel {
|
||||||
.share()
|
.share()
|
||||||
.eraseToAnyPublisher()
|
.eraseToAnyPublisher()
|
||||||
|
|
||||||
// Set the timeline name for display
|
|
||||||
selectedFeedsPublisher
|
|
||||||
.map { feeds -> String in
|
|
||||||
switch feeds.count {
|
|
||||||
case 0:
|
|
||||||
return ""
|
|
||||||
case 1:
|
|
||||||
return feeds.first!.nameForDisplay
|
|
||||||
default:
|
|
||||||
return NSLocalizedString("Multiple", comment: "Multiple")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.assign(to: &$nameForDisplay)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func subscribeToArticleSelectionChanges() {
|
func subscribeToArticleSelectionChanges() {
|
||||||
|
|
Loading…
Reference in New Issue