From e974d788ff0181e9592b4eea8431ae17efbb3602 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sun, 26 May 2019 14:45:09 -0700 Subject: [PATCH] Wrap OPML import in BatchUpdate. This makes it pretty much instant. Fix #653. --- Frameworks/Account/LocalAccount/LocalAccountDelegate.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Frameworks/Account/LocalAccount/LocalAccountDelegate.swift b/Frameworks/Account/LocalAccount/LocalAccountDelegate.swift index 51e2c4879..5a12f5b88 100644 --- a/Frameworks/Account/LocalAccount/LocalAccountDelegate.swift +++ b/Frameworks/Account/LocalAccount/LocalAccountDelegate.swift @@ -7,6 +7,7 @@ // import Foundation +import RSCore import RSParser import Articles import RSWeb @@ -81,7 +82,9 @@ final class LocalAccountDelegate: AccountDelegate { // We use the same mechanism to load local accounts as we do to load the subscription // OPML all accounts. - account.loadOPML(loadDocument) + BatchUpdate.shared.perform { + account.loadOPML(loadDocument) + } completion(.success(())) }