mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Hide unread account information unless the Account is collapsed. Issue #1159
This commit is contained in:
@@ -29,7 +29,7 @@ class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView {
|
||||
set {
|
||||
if unreadCountView.unreadCount != newValue {
|
||||
unreadCountView.unreadCount = newValue
|
||||
unreadCountView.isHidden = (newValue < 1)
|
||||
updateUnreadCountView()
|
||||
setNeedsLayout()
|
||||
}
|
||||
}
|
||||
@@ -51,6 +51,7 @@ class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView {
|
||||
var disclosureExpanded = false {
|
||||
didSet {
|
||||
updateDisclosureImage()
|
||||
updateUnreadCountView()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,6 +142,14 @@ private extension MasterFeedTableViewSectionHeader {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func updateUnreadCountView() {
|
||||
if !disclosureExpanded && unreadCount > 0 {
|
||||
unreadCountView.isHidden = false
|
||||
} else {
|
||||
self.unreadCountView.isHidden = true
|
||||
}
|
||||
}
|
||||
|
||||
func addSubviewAtInit(_ view: UIView) {
|
||||
addSubview(view)
|
||||
|
||||
@@ -11,7 +11,6 @@ import Account
|
||||
import Articles
|
||||
import RSCore
|
||||
import RSTree
|
||||
import SwiftUI
|
||||
|
||||
class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user