Fix web feed sidebar not showing sometimes bug.
This commit is contained in:
parent
9be641c094
commit
7dc34e9655
|
@ -134,13 +134,13 @@ final class LocalAccountDelegate: AccountDelegate {
|
||||||
let feed = account.createWebFeed(with: name, url: newURL.absoluteString, webFeedID: newURL.absoluteString, homePageURL: nil)
|
let feed = account.createWebFeed(with: name, url: newURL.absoluteString, webFeedID: newURL.absoluteString, homePageURL: nil)
|
||||||
feed.editedName = name
|
feed.editedName = name
|
||||||
feed.username = urlComponents.user
|
feed.username = urlComponents.user
|
||||||
|
container.addWebFeed(feed)
|
||||||
|
|
||||||
feedProvider.refresh(feed) { result in
|
feedProvider.refresh(feed) { result in
|
||||||
self.refreshProgress.completeTask()
|
self.refreshProgress.completeTask()
|
||||||
switch result {
|
switch result {
|
||||||
case .success(let parsedItems):
|
case .success(let parsedItems):
|
||||||
account.update(urlString, with: parsedItems) { _ in
|
account.update(urlString, with: parsedItems) { _ in
|
||||||
container.addWebFeed(feed)
|
|
||||||
completion(.success(feed))
|
completion(.success(feed))
|
||||||
}
|
}
|
||||||
case .failure:
|
case .failure:
|
||||||
|
@ -176,6 +176,7 @@ final class LocalAccountDelegate: AccountDelegate {
|
||||||
}
|
}
|
||||||
|
|
||||||
let feed = account.createWebFeed(with: nil, url: url.absoluteString, webFeedID: url.absoluteString, homePageURL: nil)
|
let feed = account.createWebFeed(with: nil, url: url.absoluteString, webFeedID: url.absoluteString, homePageURL: nil)
|
||||||
|
container.addWebFeed(feed)
|
||||||
|
|
||||||
InitialFeedDownloader.download(url) { parsedFeed in
|
InitialFeedDownloader.download(url) { parsedFeed in
|
||||||
self.refreshProgress.completeTask()
|
self.refreshProgress.completeTask()
|
||||||
|
@ -186,7 +187,6 @@ final class LocalAccountDelegate: AccountDelegate {
|
||||||
|
|
||||||
feed.editedName = name
|
feed.editedName = name
|
||||||
|
|
||||||
container.addWebFeed(feed)
|
|
||||||
completion(.success(feed))
|
completion(.success(feed))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue