2017-09-17 11:32:58 -07:00
|
|
|
//
|
|
|
|
// LocalAccountDelegate.swift
|
|
|
|
// Account
|
|
|
|
//
|
|
|
|
// Created by Brent Simmons on 9/16/17.
|
|
|
|
// Copyright © 2017 Ranchero Software, LLC. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
2017-10-07 17:20:19 -07:00
|
|
|
import RSWeb
|
2017-09-17 11:32:58 -07:00
|
|
|
|
2017-10-07 14:40:14 -07:00
|
|
|
final class LocalAccountDelegate: AccountDelegate {
|
2017-09-17 11:32:58 -07:00
|
|
|
|
2017-09-28 13:16:47 -07:00
|
|
|
let supportsSubFolders = false
|
2017-10-02 13:15:07 -07:00
|
|
|
private let refresher = LocalAccountRefresher()
|
2017-10-07 14:40:14 -07:00
|
|
|
|
2017-10-07 17:20:19 -07:00
|
|
|
var refreshProgress: DownloadProgress {
|
|
|
|
get {
|
|
|
|
return refresher.progress
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-07 17:43:10 -07:00
|
|
|
func refreshAll(for account: Account) {
|
2017-10-07 14:40:14 -07:00
|
|
|
|
2017-10-07 12:40:14 -07:00
|
|
|
refresher.refreshFeeds(account.flattenedFeeds())
|
2017-09-17 11:32:58 -07:00
|
|
|
}
|
2017-10-18 19:14:40 -07:00
|
|
|
|
2017-12-19 17:48:30 -08:00
|
|
|
func accountDidInitialize(_ account: Account) {
|
|
|
|
|
|
|
|
account.nameForDisplay = NSLocalizedString("On My Mac", comment: "Local Account Name")
|
|
|
|
}
|
|
|
|
|
2017-10-18 19:14:40 -07:00
|
|
|
// MARK: Disk
|
|
|
|
|
|
|
|
func update(account: Account, withUserInfo: NSDictionary?) {
|
|
|
|
|
2017-12-19 17:48:30 -08:00
|
|
|
|
2017-10-18 19:14:40 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
func userInfo(for: Account) -> NSDictionary? {
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
2017-09-17 11:32:58 -07:00
|
|
|
}
|