Add replay so that iOS filters work
This commit is contained in:
parent
4d8e8dab47
commit
4fe40f9ed6
|
@ -181,6 +181,7 @@ private extension TimelineModel {
|
|||
|
||||
readFilterAndFeedsPublisher = toggledReadFilterPublisher
|
||||
.merge(with: feedsReadFilterPublisher)
|
||||
.share(replay: 1)
|
||||
.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,9 @@ struct TimelineToolbarModifier: ViewModifier {
|
|||
AppAssets.filterInactiveImage.font(.title3)
|
||||
}
|
||||
}
|
||||
.onReceive(timelineModel.readFilterAndFeedsPublisher!) { (_, filtered) in
|
||||
isReadFiltered = filtered
|
||||
}
|
||||
.hidden(isReadFiltered == nil)
|
||||
.help(isReadFiltered ?? false ? "Show Read Articles" : "Filter Read Articles")
|
||||
}
|
||||
|
@ -49,9 +52,6 @@ struct TimelineToolbarModifier: ViewModifier {
|
|||
}
|
||||
#endif
|
||||
}
|
||||
.onReceive(timelineModel.readFilterAndFeedsPublisher!) { (_, filtered) in
|
||||
isReadFiltered = filtered
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue