mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Removes unused unread count code
This commit is contained in:
@@ -19,12 +19,7 @@ class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView {
|
||||
override var accessibilityLabel: String? {
|
||||
set {}
|
||||
get {
|
||||
if unreadCount > 0 {
|
||||
let unreadLabel = NSLocalizedString("unread", comment: "Unread label for accessiblity")
|
||||
return "\(name) \(unreadCount) \(unreadLabel) \(expandedStateMessage) "
|
||||
} else {
|
||||
return "\(name) \(expandedStateMessage) "
|
||||
}
|
||||
return "\(name) \(expandedStateMessage)"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,19 +33,6 @@ class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView {
|
||||
}
|
||||
}
|
||||
|
||||
var unreadCount: Int {
|
||||
get {
|
||||
return unreadCountView.unreadCount
|
||||
}
|
||||
set {
|
||||
if unreadCountView.unreadCount != newValue {
|
||||
unreadCountView.unreadCount = newValue
|
||||
updateUnreadCountView()
|
||||
setNeedsLayout()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var name: String {
|
||||
get {
|
||||
return titleView.text ?? ""
|
||||
@@ -66,7 +48,6 @@ class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView {
|
||||
var disclosureExpanded = false {
|
||||
didSet {
|
||||
updateExpandedState(animate: true)
|
||||
updateUnreadCountView()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,18 +149,6 @@ private extension MasterFeedTableViewSectionHeader {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func updateUnreadCountView() {
|
||||
if !disclosureExpanded && unreadCount > 0 {
|
||||
UIView.animate(withDuration: 0.3) {
|
||||
self.unreadCountView.alpha = 1
|
||||
}
|
||||
} else {
|
||||
UIView.animate(withDuration: 0.3) {
|
||||
self.unreadCountView.alpha = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func addSubviewAtInit(_ view: UIView) {
|
||||
contentView.addSubview(view)
|
||||
|
||||
Reference in New Issue
Block a user