Add hidden GruberFeedDoubleClickMarkAsRead preference
This commit is contained in:
parent
8a9a9910cc
commit
74298e7cde
|
@ -44,6 +44,7 @@ final class AppDefaults {
|
||||||
static let timelineShowsSeparators = "CorreiaSeparators"
|
static let timelineShowsSeparators = "CorreiaSeparators"
|
||||||
static let showTitleOnMainWindow = "KafasisTitleMode"
|
static let showTitleOnMainWindow = "KafasisTitleMode"
|
||||||
static let hideDockUnreadCount = "JustinMillerHideDockUnreadCount"
|
static let hideDockUnreadCount = "JustinMillerHideDockUnreadCount"
|
||||||
|
static let feedDoubleClickMarkAsRead = "GruberFeedDoubleClickMarkAsRead"
|
||||||
|
|
||||||
#if !MAC_APP_STORE
|
#if !MAC_APP_STORE
|
||||||
static let webInspectorEnabled = "WebInspectorEnabled"
|
static let webInspectorEnabled = "WebInspectorEnabled"
|
||||||
|
@ -203,6 +204,15 @@ final class AppDefaults {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var feedDoubleClickMarkAsRead: Bool {
|
||||||
|
get {
|
||||||
|
return AppDefaults.bool(for: Key.feedDoubleClickMarkAsRead)
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
AppDefaults.setBool(for: Key.feedDoubleClickMarkAsRead, newValue)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#if !MAC_APP_STORE
|
#if !MAC_APP_STORE
|
||||||
var webInspectorEnabled: Bool {
|
var webInspectorEnabled: Bool {
|
||||||
get {
|
get {
|
||||||
|
|
|
@ -255,6 +255,11 @@ protocol SidebarDelegate: class {
|
||||||
guard outlineView.clickedRow == outlineView.selectedRow else {
|
guard outlineView.clickedRow == outlineView.selectedRow else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if AppDefaults.shared.feedDoubleClickMarkAsRead, let articles = try? singleSelectedWebFeed?.fetchUnreadArticles() {
|
||||||
|
if let undoManager = undoManager, let markReadCommand = MarkStatusCommand(initialArticles: Array(articles), markingRead: true, undoManager: undoManager) {
|
||||||
|
runCommand(markReadCommand)
|
||||||
|
}
|
||||||
|
}
|
||||||
openInBrowser(sender)
|
openInBrowser(sender)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue