From 10296a1b747159feae416b641d67915bb80b08dd Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Fri, 31 May 2019 07:47:05 -0500 Subject: [PATCH] Clear the feed metadata on Feedbin feed delete --- Frameworks/Account/Account.swift | 4 ++++ Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift | 1 + 2 files changed, 5 insertions(+) diff --git a/Frameworks/Account/Account.swift b/Frameworks/Account/Account.swift index 5bc4cdfd0..ae57dc285 100644 --- a/Frameworks/Account/Account.swift +++ b/Frameworks/Account/Account.swift @@ -427,6 +427,10 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container, delegate.restoreFolder(for: self, folder: folder, completion: completion) } + func clearFeedMetadata(_ feed: Feed) { + feedMetadata[feed.url] = nil + } + func addFolder(_ folder: Folder) { folders!.insert(folder) postChildrenDidChangeNotification() diff --git a/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift b/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift index fbd830e9e..f7788af52 100644 --- a/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift +++ b/Frameworks/Account/Feedbin/FeedbinAccountDelegate.swift @@ -347,6 +347,7 @@ final class FeedbinAccountDelegate: AccountDelegate { if feed.folderRelationship?.count ?? 0 > 1 { deleteTagging(for: account, with: feed, from: container, completion: completion) } else { + account.clearFeedMetadata(feed) deleteSubscription(for: account, with: feed, from: container, completion: completion) } }