mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
remove existing labels on an item before assigning a new set
This commit is contained in:
parent
16fa403201
commit
609aff48fc
1 changed files with 5 additions and 0 deletions
|
|
@ -61,6 +61,11 @@ struct InternalLinkedItem {
|
|||
linkedItem.contentReader = contentReader
|
||||
linkedItem.originalHtml = originalHtml
|
||||
|
||||
// Remove existing labels in case a label had been deleted
|
||||
if let existingLabels = linkedItem.labels {
|
||||
linkedItem.removeFromLabels(existingLabels)
|
||||
}
|
||||
|
||||
for label in labels {
|
||||
linkedItem.addToLabels(label.asManagedObject(inContext: context))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue