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 {
|
set {
|
||||||
if unreadCountView.unreadCount != newValue {
|
if unreadCountView.unreadCount != newValue {
|
||||||
unreadCountView.unreadCount = newValue
|
unreadCountView.unreadCount = newValue
|
||||||
unreadCountView.isHidden = (newValue < 1)
|
updateUnreadCountView()
|
||||||
setNeedsLayout()
|
setNeedsLayout()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,6 +51,7 @@ class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView {
|
||||||
var disclosureExpanded = false {
|
var disclosureExpanded = false {
|
||||||
didSet {
|
didSet {
|
||||||
updateDisclosureImage()
|
updateDisclosureImage()
|
||||||
|
updateUnreadCountView()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,6 +143,14 @@ private extension MasterFeedTableViewSectionHeader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func updateUnreadCountView() {
|
||||||
|
if !disclosureExpanded && unreadCount > 0 {
|
||||||
|
unreadCountView.isHidden = false
|
||||||
|
} else {
|
||||||
|
self.unreadCountView.isHidden = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func addSubviewAtInit(_ view: UIView) {
|
func addSubviewAtInit(_ view: UIView) {
|
||||||
addSubview(view)
|
addSubview(view)
|
||||||
view.translatesAutoresizingMaskIntoConstraints = false
|
view.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
|
|
@ -11,7 +11,6 @@ import Account
|
||||||
import Articles
|
import Articles
|
||||||
import RSCore
|
import RSCore
|
||||||
import RSTree
|
import RSTree
|
||||||
import SwiftUI
|
|
||||||
|
|
||||||
class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
|
class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue