From 7dc34e9655e13ce60875dbd0b654cdc4f480289e Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Fri, 17 Apr 2020 04:29:54 -0500 Subject: [PATCH] Fix web feed sidebar not showing sometimes bug. --- .../Account/LocalAccount/LocalAccountDelegate.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Frameworks/Account/LocalAccount/LocalAccountDelegate.swift b/Frameworks/Account/LocalAccount/LocalAccountDelegate.swift index 9b29c32c4..68239af65 100644 --- a/Frameworks/Account/LocalAccount/LocalAccountDelegate.swift +++ b/Frameworks/Account/LocalAccount/LocalAccountDelegate.swift @@ -134,13 +134,13 @@ final class LocalAccountDelegate: AccountDelegate { let feed = account.createWebFeed(with: name, url: newURL.absoluteString, webFeedID: newURL.absoluteString, homePageURL: nil) feed.editedName = name feed.username = urlComponents.user - + container.addWebFeed(feed) + feedProvider.refresh(feed) { result in self.refreshProgress.completeTask() switch result { case .success(let parsedItems): account.update(urlString, with: parsedItems) { _ in - container.addWebFeed(feed) completion(.success(feed)) } case .failure: @@ -176,7 +176,8 @@ final class LocalAccountDelegate: AccountDelegate { } let feed = account.createWebFeed(with: nil, url: url.absoluteString, webFeedID: url.absoluteString, homePageURL: nil) - + container.addWebFeed(feed) + InitialFeedDownloader.download(url) { parsedFeed in self.refreshProgress.completeTask() @@ -186,7 +187,6 @@ final class LocalAccountDelegate: AccountDelegate { feed.editedName = name - container.addWebFeed(feed) completion(.success(feed)) }