mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Add unread count to the timeline
This commit is contained in:
@@ -479,7 +479,8 @@ private extension MasterTimelineViewController {
|
||||
}
|
||||
|
||||
titleView.label.text = coordinator.timelineName
|
||||
|
||||
updateTitleUnreadCount()
|
||||
|
||||
if coordinator.timelineFetcher is Feed {
|
||||
titleView.heightAnchor.constraint(equalToConstant: 44.0).isActive = true
|
||||
let tap = UITapGestureRecognizer(target: self, action:#selector(showFeedInspector(_:)))
|
||||
@@ -500,10 +501,17 @@ private extension MasterTimelineViewController {
|
||||
}
|
||||
|
||||
func updateUI() {
|
||||
updateTitleUnreadCount()
|
||||
markAllAsReadButton.isEnabled = coordinator.isTimelineUnreadAvailable
|
||||
firstUnreadButton.isEnabled = coordinator.isTimelineUnreadAvailable
|
||||
}
|
||||
|
||||
func updateTitleUnreadCount() {
|
||||
if let unreadCountProvider = coordinator.timelineFetcher as? UnreadCountProvider {
|
||||
titleView?.unreadCountView.unreadCount = unreadCountProvider.unreadCount
|
||||
}
|
||||
}
|
||||
|
||||
func updateProgressIndicatorIfNeeded() {
|
||||
if !coordinator.isThreePanelMode {
|
||||
navigationController?.updateAccountRefreshProgressIndicator()
|
||||
|
||||
Reference in New Issue
Block a user