mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Create and use UnreadCountFormatter. Fix #3892.
This commit is contained in:
@@ -26,7 +26,8 @@ class FeedTableViewCell : VibrantTableViewCell {
|
||||
get {
|
||||
if unreadCount > 0 {
|
||||
let unreadLabel = NSLocalizedString("unread", comment: "Unread label for accessiblity")
|
||||
return "\(name) \(unreadCount) \(unreadLabel)"
|
||||
let unreadCountString = UnreadCountFormatter.string(from: unreadCount)
|
||||
return "\(name) \(unreadCountString) \(unreadLabel)"
|
||||
} else {
|
||||
return name
|
||||
}
|
||||
|
||||
@@ -23,7 +23,8 @@ class FeedTableViewSectionHeader: UITableViewHeaderFooterView {
|
||||
get {
|
||||
if unreadCount > 0 {
|
||||
let unreadLabel = NSLocalizedString("unread", comment: "Unread label for accessiblity")
|
||||
return "\(name) \(unreadCount) \(unreadLabel) \(expandedStateMessage) "
|
||||
let unreadCountString = UnreadCountFormatter.string(from: unreadCount)
|
||||
return "\(name) \(unreadCountString) \(unreadLabel) \(expandedStateMessage) "
|
||||
} else {
|
||||
return "\(name) \(expandedStateMessage) "
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class FeedUnreadCountView : UIView {
|
||||
}
|
||||
|
||||
var unreadCountString: String {
|
||||
return unreadCount < 1 ? "" : "\(unreadCount)"
|
||||
UnreadCountFormatter.string(from: unreadCount)
|
||||
}
|
||||
|
||||
private var contentSizeIsValid = false
|
||||
|
||||
Reference in New Issue
Block a user