add hidden pref for show/hide dock unread count
This commit is contained in:
parent
b7cdde63c1
commit
41547663b9
@ -58,6 +58,7 @@ struct AppDefaults {
|
|||||||
|
|
||||||
// Hidden prefs
|
// Hidden prefs
|
||||||
static let showTitleOnMainWindow = "KafasisTitleMode"
|
static let showTitleOnMainWindow = "KafasisTitleMode"
|
||||||
|
static let hideDockUnreadCount = "Issue246HideDockUnreadCount"
|
||||||
}
|
}
|
||||||
|
|
||||||
private static let smallestFontSizeRawValue = FontSize.small.rawValue
|
private static let smallestFontSizeRawValue = FontSize.small.rawValue
|
||||||
@ -111,6 +112,10 @@ struct AppDefaults {
|
|||||||
return bool(for: Key.showTitleOnMainWindow)
|
return bool(for: Key.showTitleOnMainWindow)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static var hideDockUnreadCount: Bool {
|
||||||
|
return bool(for: Key.hideDockUnreadCount)
|
||||||
|
}
|
||||||
|
|
||||||
static var timelineSortDirection: ComparisonResult {
|
static var timelineSortDirection: ComparisonResult {
|
||||||
get {
|
get {
|
||||||
return sortDirection(for: Key.timelineSortDirection)
|
return sortDirection(for: Key.timelineSortDirection)
|
||||||
|
@ -347,7 +347,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations,
|
|||||||
// MARK: - Dock Badge
|
// MARK: - Dock Badge
|
||||||
|
|
||||||
@objc func updateDockBadge() {
|
@objc func updateDockBadge() {
|
||||||
let label = unreadCount > 0 ? "\(unreadCount)" : ""
|
let label = unreadCount > 0 && !AppDefaults.hideDockUnreadCount ? "\(unreadCount)" : ""
|
||||||
NSApplication.shared.dockTile.badgeLabel = label
|
NSApplication.shared.dockTile.badgeLabel = label
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user