diff --git a/Mastodon/Service/APIService/APIService+Status.swift b/Mastodon/Service/APIService/APIService+Status.swift index c927b05a8..01bc667ef 100644 --- a/Mastodon/Service/APIService/APIService+Status.swift +++ b/Mastodon/Service/APIService/APIService+Status.swift @@ -117,6 +117,14 @@ extension APIService { } }() if let status = oldStatus { + let homeTimelineIndexes = status.homeTimelineIndexes ?? Set() + for homeTimelineIndex in homeTimelineIndexes { + self.backgroundManagedObjectContext.delete(homeTimelineIndex) + } + let inNotifications = status.inNotifications ?? Set() + for notification in inNotifications { + self.backgroundManagedObjectContext.delete(notification) + } self.backgroundManagedObjectContext.delete(status) } }