Mark Read command now works.
This commit is contained in:
parent
11aa68fd6f
commit
a7464daf15
@ -1,8 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="12118" systemVersion="16F73" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="13770" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment identifier="macosx"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13770"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="12118"/>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<scenes>
|
<scenes>
|
||||||
<!--Application-->
|
<!--Application-->
|
||||||
@ -412,7 +411,11 @@
|
|||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
<menu key="submenu" title="Article" id="57V-gv-vEw">
|
<menu key="submenu" title="Article" id="57V-gv-vEw">
|
||||||
<items>
|
<items>
|
||||||
<menuItem title="Mark as Read" keyEquivalent="U" id="Fc9-c7-2AY"/>
|
<menuItem title="Mark as Read" keyEquivalent="U" id="Fc9-c7-2AY">
|
||||||
|
<connections>
|
||||||
|
<action selector="markRead:" target="Ady-hI-5gd" id="RQv-jl-2Nv"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
<menuItem title="Mark All as Read" keyEquivalent="k" id="HdN-Ks-cwh">
|
<menuItem title="Mark All as Read" keyEquivalent="k" id="HdN-Ks-cwh">
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="markAllAsRead:" target="Ady-hI-5gd" id="154-2D-ONk"/>
|
<action selector="markAllAsRead:" target="Ady-hI-5gd" id="154-2D-ONk"/>
|
||||||
|
@ -141,6 +141,9 @@
|
|||||||
<font key="font" metaFont="system"/>
|
<font key="font" metaFont="system"/>
|
||||||
</buttonCell>
|
</buttonCell>
|
||||||
</button>
|
</button>
|
||||||
|
<connections>
|
||||||
|
<action selector="markRead:" target="Oky-zY-oP4" id="yFY-gd-FOd"/>
|
||||||
|
</connections>
|
||||||
</toolbarItem>
|
</toolbarItem>
|
||||||
<toolbarItem implicitItemIdentifier="4DED27B7-8961-48F3-A995-9C961E2C0257" label="Open in Browser" paletteLabel="Open in Browser" image="ToolbarPlaceholder" id="tid-SB-me3" customClass="RSToolbarItem" customModule="RSCore">
|
<toolbarItem implicitItemIdentifier="4DED27B7-8961-48F3-A995-9C961E2C0257" label="Open in Browser" paletteLabel="Open in Browser" image="ToolbarPlaceholder" id="tid-SB-me3" customClass="RSToolbarItem" customModule="RSCore">
|
||||||
<nil key="toolTip"/>
|
<nil key="toolTip"/>
|
||||||
|
@ -102,6 +102,10 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
|
|||||||
return canMarkAllAsRead()
|
return canMarkAllAsRead()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if item.action == #selector(markRead(_:)) {
|
||||||
|
return canMarkRead()
|
||||||
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,6 +144,11 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
|
|||||||
timelineViewController?.markAllAsRead()
|
timelineViewController?.markAllAsRead()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@IBAction func markRead(_ sender: AnyObject?) {
|
||||||
|
|
||||||
|
timelineViewController?.markSelectedArticlesAsRead(sender!)
|
||||||
|
}
|
||||||
|
|
||||||
@IBAction func toggleSidebar(_ sender: AnyObject?) {
|
@IBAction func toggleSidebar(_ sender: AnyObject?) {
|
||||||
|
|
||||||
splitViewController!.toggleSidebar(sender)
|
splitViewController!.toggleSidebar(sender)
|
||||||
@ -218,6 +227,11 @@ private extension MainWindowController {
|
|||||||
return timelineViewController?.canMarkAllAsRead() ?? false
|
return timelineViewController?.canMarkAllAsRead() ?? false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func canMarkRead() -> Bool {
|
||||||
|
|
||||||
|
return timelineViewController?.canMarkSelectedArticlesAsRead() ?? false
|
||||||
|
}
|
||||||
|
|
||||||
func updateWindowTitle() {
|
func updateWindowTitle() {
|
||||||
|
|
||||||
if unreadCount < 1 {
|
if unreadCount < 1 {
|
||||||
|
@ -81,9 +81,6 @@ final class StatusBarView: NSView {
|
|||||||
guard let window = window, let notificationWindow = appInfo.view?.window, window === notificationWindow else {
|
guard let window = window, let notificationWindow = appInfo.view?.window, window === notificationWindow else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
guard let link = appInfo.url else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
mouseoverLink = nil
|
mouseoverLink = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,6 +127,11 @@ class TimelineViewController: NSViewController, KeyboardDelegate, UndoableComman
|
|||||||
return articles.canMarkAllAsRead()
|
return articles.canMarkAllAsRead()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func canMarkSelectedArticlesAsRead() -> Bool {
|
||||||
|
|
||||||
|
return selectedArticles.canMarkAllAsRead()
|
||||||
|
}
|
||||||
|
|
||||||
// MARK: - Actions
|
// MARK: - Actions
|
||||||
|
|
||||||
@objc func openArticleInBrowser(_ sender: AnyObject) {
|
@objc func openArticleInBrowser(_ sender: AnyObject) {
|
||||||
@ -153,7 +158,7 @@ class TimelineViewController: NSViewController, KeyboardDelegate, UndoableComman
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@IBAction func markSelectedArticlesAsRead(_ sender: AnyObject) {
|
@IBAction func markSelectedArticlesAsRead(_ sender: AnyObject?) {
|
||||||
|
|
||||||
guard let undoManager = undoManager, let markReadCommand = MarkReadOrUnreadCommand(initialArticles: selectedArticles, markingRead: true, undoManager: undoManager) else {
|
guard let undoManager = undoManager, let markReadCommand = MarkReadOrUnreadCommand(initialArticles: selectedArticles, markingRead: true, undoManager: undoManager) else {
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user