2020-03-18 21:48:44 +01:00
|
|
|
//
|
|
|
|
// CloudKitAppDelegate.swift
|
|
|
|
// Account
|
|
|
|
//
|
|
|
|
// Created by Maurice Parker on 3/18/20.
|
|
|
|
// Copyright © 2020 Ranchero Software, LLC. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
2020-03-22 22:35:03 +01:00
|
|
|
import CloudKit
|
|
|
|
import os.log
|
|
|
|
import SyncDatabase
|
2020-03-18 21:48:44 +01:00
|
|
|
import RSCore
|
|
|
|
import RSParser
|
|
|
|
import Articles
|
|
|
|
import RSWeb
|
|
|
|
|
|
|
|
public enum CloudKitAccountDelegateError: String, Error {
|
|
|
|
case invalidParameter = "An invalid parameter was used."
|
|
|
|
}
|
|
|
|
|
|
|
|
final class CloudKitAccountDelegate: AccountDelegate {
|
|
|
|
|
2020-03-22 22:35:03 +01:00
|
|
|
private var log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "CloudKit")
|
|
|
|
|
|
|
|
private let database: SyncDatabase
|
|
|
|
|
|
|
|
private let container: CKContainer = {
|
|
|
|
let orgID = Bundle.main.object(forInfoDictionaryKey: "OrganizationIdentifier") as! String
|
|
|
|
return CKContainer(identifier: "iCloud.\(orgID).NetNewsWire")
|
|
|
|
}()
|
|
|
|
|
2020-04-01 18:46:37 +02:00
|
|
|
private lazy var zones: [CloudKitZone] = [accountZone, articlesZone]
|
2020-03-22 22:35:03 +01:00
|
|
|
private let accountZone: CloudKitAccountZone
|
2020-04-01 18:46:37 +02:00
|
|
|
private let articlesZone: CloudKitArticlesZone
|
2020-03-22 22:35:03 +01:00
|
|
|
|
|
|
|
private let refresher = LocalAccountRefresher()
|
|
|
|
|
2020-03-18 21:48:44 +01:00
|
|
|
let behaviors: AccountBehaviors = []
|
|
|
|
let isOPMLImportInProgress = false
|
|
|
|
|
|
|
|
let server: String? = nil
|
|
|
|
var credentials: Credentials?
|
|
|
|
var accountMetadata: AccountMetadata?
|
|
|
|
|
|
|
|
var refreshProgress: DownloadProgress {
|
|
|
|
return refresher.progress
|
|
|
|
}
|
|
|
|
|
2020-03-22 22:35:03 +01:00
|
|
|
init(dataFolder: String) {
|
|
|
|
accountZone = CloudKitAccountZone(container: container)
|
2020-04-01 18:46:37 +02:00
|
|
|
articlesZone = CloudKitArticlesZone(container: container)
|
|
|
|
|
2020-03-22 22:35:03 +01:00
|
|
|
let databaseFilePath = (dataFolder as NSString).appendingPathComponent("Sync.sqlite3")
|
|
|
|
database = SyncDatabase(databaseFilePath: databaseFilePath)
|
2020-04-01 18:46:37 +02:00
|
|
|
|
2020-03-30 00:12:34 +02:00
|
|
|
accountZone.refreshProgress = refreshProgress
|
2020-03-22 22:35:03 +01:00
|
|
|
}
|
|
|
|
|
2020-03-30 09:48:25 +02:00
|
|
|
func receiveRemoteNotification(for account: Account, userInfo: [AnyHashable : Any], completion: @escaping () -> Void) {
|
|
|
|
let group = DispatchGroup()
|
2020-04-01 03:42:39 +02:00
|
|
|
BatchUpdate.shared.start()
|
2020-03-30 09:48:25 +02:00
|
|
|
|
|
|
|
zones.forEach { zone in
|
|
|
|
group.enter()
|
|
|
|
zone.receiveRemoteNotification(userInfo: userInfo) {
|
|
|
|
group.leave()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
group.notify(queue: DispatchQueue.main) {
|
2020-04-01 03:42:39 +02:00
|
|
|
BatchUpdate.shared.end()
|
2020-03-30 09:48:25 +02:00
|
|
|
completion()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-18 21:48:44 +01:00
|
|
|
func refreshAll(for account: Account, completion: @escaping (Result<Void, Error>) -> Void) {
|
2020-03-31 18:18:52 +02:00
|
|
|
BatchUpdate.shared.start()
|
2020-03-30 00:12:34 +02:00
|
|
|
accountZone.fetchChangesInZone() { result in
|
|
|
|
switch result {
|
|
|
|
case .success:
|
2020-04-01 18:46:37 +02:00
|
|
|
|
|
|
|
self.sendArticleStatus(for: account) { result in
|
|
|
|
switch result {
|
|
|
|
case .success:
|
|
|
|
|
|
|
|
self.refreshArticleStatus(for: account) { result in
|
|
|
|
switch result {
|
|
|
|
case .success:
|
|
|
|
|
|
|
|
self.refresher.refreshFeeds(account.flattenedWebFeeds()) {
|
|
|
|
BatchUpdate.shared.end()
|
|
|
|
account.metadata.lastArticleFetchEndTime = Date()
|
|
|
|
completion(.success(()))
|
|
|
|
}
|
|
|
|
|
|
|
|
case .failure(let error):
|
|
|
|
completion(.failure(error))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case .failure(let error):
|
|
|
|
completion(.failure(error))
|
|
|
|
}
|
|
|
|
|
2020-03-30 00:12:34 +02:00
|
|
|
}
|
|
|
|
case .failure(let error):
|
2020-03-31 18:18:52 +02:00
|
|
|
BatchUpdate.shared.end()
|
2020-03-30 00:12:34 +02:00
|
|
|
completion(.failure(error))
|
|
|
|
}
|
2020-03-18 21:48:44 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func sendArticleStatus(for account: Account, completion: @escaping ((Result<Void, Error>) -> Void)) {
|
2020-04-01 18:46:37 +02:00
|
|
|
os_log(.debug, log: log, "Sending article statuses...")
|
|
|
|
|
|
|
|
database.selectForProcessing { result in
|
|
|
|
|
|
|
|
func processStatuses(_ syncStatuses: [SyncStatus]) {
|
2020-04-01 21:10:07 +02:00
|
|
|
guard syncStatuses.count > 0 else {
|
|
|
|
completion(.success(()))
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2020-04-01 18:46:37 +02:00
|
|
|
self.articlesZone.sendArticleStatus(syncStatuses) { result in
|
|
|
|
switch result {
|
|
|
|
case .success:
|
2020-04-01 21:55:22 +02:00
|
|
|
self.database.deleteSelectedForProcessing(syncStatuses.map({ $0.articleID }) )
|
2020-04-01 18:46:37 +02:00
|
|
|
os_log(.debug, log: self.log, "Done sending article statuses.")
|
|
|
|
completion(.success(()))
|
|
|
|
case .failure(let error):
|
2020-04-01 21:55:22 +02:00
|
|
|
self.database.resetSelectedForProcessing(syncStatuses.map({ $0.articleID }) )
|
2020-04-01 18:46:37 +02:00
|
|
|
completion(.failure(error))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
switch result {
|
|
|
|
case .success(let syncStatuses):
|
|
|
|
processStatuses(syncStatuses)
|
|
|
|
case .failure(let databaseError):
|
|
|
|
completion(.failure(databaseError))
|
|
|
|
}
|
|
|
|
}
|
2020-03-18 21:48:44 +01:00
|
|
|
}
|
|
|
|
|
2020-04-01 18:46:37 +02:00
|
|
|
|
2020-03-18 21:48:44 +01:00
|
|
|
func refreshArticleStatus(for account: Account, completion: @escaping ((Result<Void, Error>) -> Void)) {
|
2020-04-01 18:46:37 +02:00
|
|
|
os_log(.debug, log: log, "Refreshing article statuses...")
|
|
|
|
|
|
|
|
articlesZone.fetchChangesInZone() { result in
|
|
|
|
os_log(.debug, log: self.log, "Done refreshing article statuses.")
|
|
|
|
switch result {
|
|
|
|
case .success:
|
|
|
|
completion(.success(()))
|
|
|
|
case .failure(let error):
|
|
|
|
completion(.failure(error))
|
|
|
|
}
|
|
|
|
}
|
2020-03-18 21:48:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func importOPML(for account:Account, opmlFile: URL, completion: @escaping (Result<Void, Error>) -> Void) {
|
|
|
|
var fileData: Data?
|
|
|
|
|
|
|
|
do {
|
|
|
|
fileData = try Data(contentsOf: opmlFile)
|
|
|
|
} catch {
|
|
|
|
completion(.failure(error))
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
guard let opmlData = fileData else {
|
|
|
|
completion(.success(()))
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
let parserData = ParserData(url: opmlFile.absoluteString, data: opmlData)
|
|
|
|
var opmlDocument: RSOPMLDocument?
|
|
|
|
|
|
|
|
do {
|
|
|
|
opmlDocument = try RSOPMLParser.parseOPML(with: parserData)
|
|
|
|
} catch {
|
|
|
|
completion(.failure(error))
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
guard let loadDocument = opmlDocument else {
|
|
|
|
completion(.success(()))
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2020-04-01 01:10:35 +02:00
|
|
|
guard let opmlItems = loadDocument.children, let rootExternalID = account.externalID else {
|
2020-03-18 21:48:44 +01:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2020-04-01 01:10:35 +02:00
|
|
|
let normalizedItems = OPMLNormalizer.normalize(opmlItems)
|
2020-03-18 21:48:44 +01:00
|
|
|
|
2020-04-01 01:10:35 +02:00
|
|
|
accountZone.importOPML(rootExternalID: rootExternalID, items: normalizedItems, completion: completion)
|
2020-03-18 21:48:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func createWebFeed(for account: Account, url urlString: String, name: String?, container: Container, completion: @escaping (Result<WebFeed, Error>) -> Void) {
|
|
|
|
guard let url = URL(string: urlString) else {
|
|
|
|
completion(.failure(LocalAccountDelegateError.invalidParameter))
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
refreshProgress.addToNumberOfTasksAndRemaining(1)
|
|
|
|
FeedFinder.find(url: url) { result in
|
|
|
|
|
|
|
|
switch result {
|
|
|
|
case .success(let feedSpecifiers):
|
2020-03-30 00:12:34 +02:00
|
|
|
guard let bestFeedSpecifier = FeedSpecifier.bestFeed(in: feedSpecifiers), let url = URL(string: bestFeedSpecifier.urlString) else {
|
|
|
|
self.refreshProgress.completeTask()
|
|
|
|
completion(.failure(AccountError.createErrorNotFound))
|
|
|
|
return
|
2020-03-18 21:48:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if account.hasWebFeed(withURL: bestFeedSpecifier.urlString) {
|
|
|
|
self.refreshProgress.completeTask()
|
|
|
|
completion(.failure(AccountError.createErrorAlreadySubscribed))
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2020-03-31 04:11:57 +02:00
|
|
|
self.accountZone.createWebFeed(url: bestFeedSpecifier.urlString, editedName: name, container: container) { result in
|
2020-03-29 10:43:20 +02:00
|
|
|
switch result {
|
2020-03-31 09:20:47 +02:00
|
|
|
case .success(let externalID):
|
2020-03-29 10:43:20 +02:00
|
|
|
|
|
|
|
let feed = account.createWebFeed(with: nil, url: url.absoluteString, webFeedID: url.absoluteString, homePageURL: nil)
|
2020-04-01 01:10:35 +02:00
|
|
|
feed.editedName = name
|
|
|
|
feed.externalID = externalID
|
|
|
|
container.addWebFeed(feed)
|
|
|
|
|
2020-03-29 10:43:20 +02:00
|
|
|
InitialFeedDownloader.download(url) { parsedFeed in
|
|
|
|
self.refreshProgress.completeTask()
|
2020-03-18 21:48:44 +01:00
|
|
|
|
2020-03-29 10:43:20 +02:00
|
|
|
if let parsedFeed = parsedFeed {
|
|
|
|
account.update(feed, with: parsedFeed, {_ in
|
|
|
|
completion(.success(feed))
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case .failure(let error):
|
|
|
|
self.refreshProgress.completeTask()
|
2020-03-31 18:07:54 +02:00
|
|
|
completion(.failure(error))
|
2020-03-18 21:48:44 +01:00
|
|
|
}
|
|
|
|
}
|
2020-03-29 10:43:20 +02:00
|
|
|
|
2020-03-18 21:48:44 +01:00
|
|
|
case .failure:
|
|
|
|
self.refreshProgress.completeTask()
|
|
|
|
completion(.failure(AccountError.createErrorNotFound))
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func renameWebFeed(for account: Account, with feed: WebFeed, to name: String, completion: @escaping (Result<Void, Error>) -> Void) {
|
2020-03-30 00:53:11 +02:00
|
|
|
let editedName = name.isEmpty ? nil : name
|
|
|
|
accountZone.renameWebFeed(feed, editedName: editedName) { result in
|
|
|
|
switch result {
|
|
|
|
case .success:
|
|
|
|
feed.editedName = name
|
|
|
|
completion(.success(()))
|
|
|
|
case .failure(let error):
|
|
|
|
completion(.failure(error))
|
|
|
|
}
|
|
|
|
}
|
2020-03-18 21:48:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func removeWebFeed(for account: Account, with feed: WebFeed, from container: Container, completion: @escaping (Result<Void, Error>) -> Void) {
|
2020-03-31 10:30:53 +02:00
|
|
|
accountZone.removeWebFeed(feed, from: container) { result in
|
2020-03-29 15:52:59 +02:00
|
|
|
switch result {
|
|
|
|
case .success:
|
|
|
|
container.removeWebFeed(feed)
|
|
|
|
completion(.success(()))
|
|
|
|
case .failure(let error):
|
|
|
|
completion(.failure(error))
|
|
|
|
}
|
|
|
|
}
|
2020-03-18 21:48:44 +01:00
|
|
|
}
|
|
|
|
|
2020-03-31 10:30:53 +02:00
|
|
|
func moveWebFeed(for account: Account, with feed: WebFeed, from fromContainer: Container, to toContainer: Container, completion: @escaping (Result<Void, Error>) -> Void) {
|
|
|
|
accountZone.moveWebFeed(feed, from: fromContainer, to: toContainer) { result in
|
|
|
|
switch result {
|
|
|
|
case .success:
|
|
|
|
fromContainer.removeWebFeed(feed)
|
|
|
|
toContainer.addWebFeed(feed)
|
|
|
|
completion(.success(()))
|
|
|
|
case .failure(let error):
|
|
|
|
completion(.failure(error))
|
|
|
|
}
|
|
|
|
}
|
2020-03-18 21:48:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func addWebFeed(for account: Account, with feed: WebFeed, to container: Container, completion: @escaping (Result<Void, Error>) -> Void) {
|
2020-03-31 10:30:53 +02:00
|
|
|
accountZone.addWebFeed(feed, to: container) { result in
|
|
|
|
switch result {
|
|
|
|
case .success:
|
|
|
|
container.addWebFeed(feed)
|
|
|
|
completion(.success(()))
|
|
|
|
case .failure(let error):
|
|
|
|
completion(.failure(error))
|
|
|
|
}
|
|
|
|
}
|
2020-03-18 21:48:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func restoreWebFeed(for account: Account, feed: WebFeed, container: Container, completion: @escaping (Result<Void, Error>) -> Void) {
|
2020-03-31 18:07:54 +02:00
|
|
|
accountZone.createWebFeed(url: feed.url, editedName: feed.editedName, container: container) { result in
|
|
|
|
switch result {
|
|
|
|
case .success(let externalID):
|
|
|
|
feed.externalID = externalID
|
|
|
|
container.addWebFeed(feed)
|
|
|
|
completion(.success(()))
|
|
|
|
case .failure(let error):
|
|
|
|
completion(.failure(error))
|
|
|
|
}
|
|
|
|
}
|
2020-03-18 21:48:44 +01:00
|
|
|
}
|
|
|
|
|
2020-03-30 20:35:02 +02:00
|
|
|
func createFolder(for account: Account, name: String, completion: @escaping (Result<Folder, Error>) -> Void) {
|
2020-03-30 22:15:45 +02:00
|
|
|
accountZone.createFolder(name: name) { result in
|
|
|
|
switch result {
|
|
|
|
case .success(let externalID):
|
|
|
|
if let folder = account.ensureFolder(with: name) {
|
|
|
|
folder.externalID = externalID
|
|
|
|
completion(.success(folder))
|
|
|
|
} else {
|
|
|
|
completion(.failure(FeedbinAccountDelegateError.invalidParameter))
|
|
|
|
}
|
|
|
|
case .failure(let error):
|
|
|
|
completion(.failure(error))
|
|
|
|
}
|
2020-03-18 21:48:44 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func renameFolder(for account: Account, with folder: Folder, to name: String, completion: @escaping (Result<Void, Error>) -> Void) {
|
2020-03-30 22:15:45 +02:00
|
|
|
accountZone.renameFolder(folder, to: name) { result in
|
|
|
|
switch result {
|
|
|
|
case .success:
|
|
|
|
folder.name = name
|
|
|
|
completion(.success(()))
|
|
|
|
case .failure(let error):
|
|
|
|
completion(.failure(error))
|
|
|
|
}
|
|
|
|
}
|
2020-03-18 21:48:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func removeFolder(for account: Account, with folder: Folder, completion: @escaping (Result<Void, Error>) -> Void) {
|
2020-03-30 22:15:45 +02:00
|
|
|
accountZone.removeFolder(folder) { result in
|
|
|
|
switch result {
|
|
|
|
case .success:
|
|
|
|
account.removeFolder(folder)
|
|
|
|
completion(.success(()))
|
|
|
|
case .failure(let error):
|
|
|
|
completion(.failure(error))
|
|
|
|
}
|
|
|
|
}
|
2020-03-18 21:48:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func restoreFolder(for account: Account, folder: Folder, completion: @escaping (Result<Void, Error>) -> Void) {
|
2020-03-30 22:15:45 +02:00
|
|
|
guard let name = folder.name else {
|
|
|
|
completion(.failure(LocalAccountDelegateError.invalidParameter))
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
accountZone.createFolder(name: name) { result in
|
|
|
|
switch result {
|
|
|
|
case .success(let externalID):
|
|
|
|
folder.externalID = externalID
|
|
|
|
account.addFolder(folder)
|
2020-03-31 18:07:54 +02:00
|
|
|
|
|
|
|
let group = DispatchGroup()
|
|
|
|
for feed in folder.topLevelWebFeeds {
|
|
|
|
|
|
|
|
folder.topLevelWebFeeds.remove(feed)
|
|
|
|
|
|
|
|
group.enter()
|
|
|
|
self.restoreWebFeed(for: account, feed: feed, container: folder) { result in
|
|
|
|
group.leave()
|
|
|
|
switch result {
|
|
|
|
case .success:
|
|
|
|
break
|
|
|
|
case .failure(let error):
|
|
|
|
os_log(.error, log: self.log, "Restore folder feed error: %@.", error.localizedDescription)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
group.notify(queue: DispatchQueue.main) {
|
|
|
|
account.addFolder(folder)
|
|
|
|
completion(.success(()))
|
|
|
|
}
|
|
|
|
|
2020-03-30 22:15:45 +02:00
|
|
|
case .failure(let error):
|
|
|
|
completion(.failure(error))
|
|
|
|
}
|
|
|
|
}
|
2020-03-18 21:48:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func markArticles(for account: Account, articles: Set<Article>, statusKey: ArticleStatus.Key, flag: Bool) -> Set<Article>? {
|
2020-04-01 03:56:34 +02:00
|
|
|
let syncStatuses = articles.map { article in
|
|
|
|
return SyncStatus(articleID: article.articleID, key: statusKey, flag: flag)
|
|
|
|
}
|
|
|
|
database.insertStatuses(syncStatuses)
|
|
|
|
|
|
|
|
database.selectPendingCount { result in
|
|
|
|
if let count = try? result.get(), count > 100 {
|
|
|
|
self.sendArticleStatus(for: account) { _ in }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-18 21:48:44 +01:00
|
|
|
return try? account.update(articles, statusKey: statusKey, flag: flag)
|
|
|
|
}
|
|
|
|
|
|
|
|
func accountDidInitialize(_ account: Account) {
|
2020-03-30 00:12:34 +02:00
|
|
|
accountZone.delegate = CloudKitAcountZoneDelegate(account: account, refreshProgress: refreshProgress)
|
2020-04-01 21:10:07 +02:00
|
|
|
articlesZone.delegate = CloudKitArticlesZoneDelegate(account: account, database: database)
|
2020-03-30 22:15:45 +02:00
|
|
|
|
|
|
|
if account.externalID == nil {
|
|
|
|
accountZone.findOrCreateAccount() { result in
|
|
|
|
switch result {
|
|
|
|
case .success(let externalID):
|
|
|
|
account.externalID = externalID
|
|
|
|
case .failure(let error):
|
|
|
|
os_log(.error, log: self.log, "Error adding account container: %@", error.localizedDescription)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-30 09:48:25 +02:00
|
|
|
zones.forEach { zone in
|
|
|
|
zone.resumeLongLivedOperationIfPossible()
|
|
|
|
zone.subscribe()
|
|
|
|
}
|
2020-03-18 21:48:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func accountWillBeDeleted(_ account: Account) {
|
2020-03-30 09:48:25 +02:00
|
|
|
zones.forEach { zone in
|
|
|
|
zone.resetChangeToken()
|
|
|
|
}
|
2020-03-18 21:48:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static func validateCredentials(transport: Transport, credentials: Credentials, endpoint: URL? = nil, completion: (Result<Credentials?, Error>) -> Void) {
|
|
|
|
return completion(.success(nil))
|
|
|
|
}
|
|
|
|
|
|
|
|
// MARK: Suspend and Resume (for iOS)
|
|
|
|
|
|
|
|
func suspendNetwork() {
|
|
|
|
refresher.suspend()
|
|
|
|
}
|
|
|
|
|
|
|
|
func suspendDatabase() {
|
2020-04-01 03:56:34 +02:00
|
|
|
database.suspend()
|
2020-03-18 21:48:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func resume() {
|
|
|
|
refresher.resume()
|
2020-04-01 03:56:34 +02:00
|
|
|
database.resume()
|
2020-03-18 21:48:44 +01:00
|
|
|
}
|
|
|
|
}
|