1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2024-12-25 08:21:40 +01:00

fix: delete relationship missing for Status issue

This commit is contained in:
CMK 2021-06-21 16:37:28 +08:00
parent 0cda0a58ff
commit a9cce7b3e3

View File

@ -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)
}
}