mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-28 00:04:25 +00:00
Update sdef and add needed KVO accessors to make get item 1 of (allWebFeeds of account 1) work.
This commit is contained in:
1 parent
b495def859
commit
c04daf289f
3 files changed
+45
-12
No files matched your search
@@ -60,6 +60,18 @@ extension NSApplication : ScriptingObjectContainer {
|
||||
return accounts.map { ScriptableAccount($0) } as NSArray
|
||||
}
|
||||
|
||||
@objc(countOfAccounts)
|
||||
func countOfAccounts() -> Int {
|
||||
return AccountManager.shared.accounts.count
|
||||
}
|
||||
|
||||
@objc(objectInAccountsAtIndex:)
|
||||
func objectInAccountsAtIndex(_ index: Int) -> ScriptableAccount? {
|
||||
let accounts = Array(AccountManager.shared.accounts)
|
||||
guard index >= 0 && index < accounts.count else { return nil }
|
||||
return ScriptableAccount(accounts[index])
|
||||
}
|
||||
|
||||
@objc(valueInAccountsWithUniqueID:)
|
||||
func valueInAccounts(withUniqueID id:String) -> ScriptableAccount? {
|
||||
let accounts = AccountManager.shared.accounts
|
||||
|
||||
Reference in new issue
Block a user