diff --git a/Frameworks/Account/Account.swift b/Frameworks/Account/Account.swift index 9565f1dc9..2ed7a8ed8 100644 --- a/Frameworks/Account/Account.swift +++ b/Frameworks/Account/Account.swift @@ -672,7 +672,9 @@ private extension Account { do { fileData = try Data(contentsOf: opmlFileURL) } catch { - NSApplication.shared.presentError(error) + // Commented out because it’s not an error on first run. + // TODO: make it so we know if it’s first run or not. + //NSApplication.shared.presentError(error) return } guard let opmlData = fileData else { @@ -811,6 +813,8 @@ private extension Account { database.fetchAllNonZeroUnreadCounts { (unreadCountDictionary) in if unreadCountDictionary.isEmpty { + self.fetchingAllUnreadCounts = false + self.updateUnreadCount() return } diff --git a/Importers/DefaultFeedsImporter.swift b/Importers/DefaultFeedsImporter.swift index 839e8f2ee..3177564f9 100644 --- a/Importers/DefaultFeedsImporter.swift +++ b/Importers/DefaultFeedsImporter.swift @@ -45,13 +45,9 @@ struct FeedsImporter { let feedsToImport = feeds(with: feedDictionaries, account: account) BatchUpdate.shared.perform { - for feed in feedsToImport { - if !account.hasFeed(with: feed.feedID) { - account.addFeed(feed, to: nil) - } - } + feedsToImport.forEach{ account.addFeed($0, to: nil) } } - account.dirty = true + account.structureDidChange() } private static func feeds(with feedDictionaries: [DiskFeedDictionary], account: Account) -> Set {