Hide unread account information unless the Account is collapsed. Issue #1159
This commit is contained in:
parent
f0ecfa6150
commit
17af3f28bf
@ -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 {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user