Merge pull request #749 from Wevah/article-status-readwrite
Make read/starred read/write via AppleScript
This commit is contained in:
commit
165adcefa0
|
@ -202,10 +202,10 @@
|
||||||
<property name="modified date" code="MDat" type="date" access="r" description="date the article was last modified">
|
<property name="modified date" code="MDat" type="date" access="r" description="date the article was last modified">
|
||||||
<cocoa key="dateModified"/>
|
<cocoa key="dateModified"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="read" code="Read" type="boolean" access="r" description="has the article been read">
|
<property name="read" code="Read" type="boolean" access="rw" description="has the article been read">
|
||||||
<cocoa key="read"/>
|
<cocoa key="read"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="starred" code="Star" type="boolean" access="r" description="has the article been marked with a star">
|
<property name="starred" code="Star" type="boolean" access="rw" description="has the article been marked with a star">
|
||||||
<cocoa key="starred"/>
|
<cocoa key="starred"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="deleted" code="Delt" type="boolean" access="r" description="has the article been deleted by the user">
|
<property name="deleted" code="Delt" type="boolean" access="r" description="has the article been deleted by the user">
|
||||||
|
|
|
@ -107,13 +107,23 @@ class ScriptableArticle: NSObject, UniqueIdScriptingObject, ScriptingObjectConta
|
||||||
|
|
||||||
@objc(read)
|
@objc(read)
|
||||||
var read:Bool {
|
var read:Bool {
|
||||||
|
get {
|
||||||
return article.status.boolStatus(forKey:.read)
|
return article.status.boolStatus(forKey:.read)
|
||||||
}
|
}
|
||||||
|
set {
|
||||||
|
markArticles([self.article], statusKey: .read, flag: newValue)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@objc(starred)
|
@objc(starred)
|
||||||
var starred:Bool {
|
var starred:Bool {
|
||||||
|
get {
|
||||||
return article.status.boolStatus(forKey:.starred)
|
return article.status.boolStatus(forKey:.starred)
|
||||||
}
|
}
|
||||||
|
set {
|
||||||
|
markArticles([self.article], statusKey: .starred, flag: newValue)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@objc(deleted)
|
@objc(deleted)
|
||||||
var deleted:Bool {
|
var deleted:Bool {
|
||||||
|
|
Loading…
Reference in New Issue