mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
associate highlight to linked item when created
This commit is contained in:
parent
61c7403d24
commit
855586c320
1 changed files with 3 additions and 1 deletions
|
|
@ -58,7 +58,9 @@ struct InternalHighlight: Encodable {
|
|||
oldHighlightsIds: [String] = []
|
||||
) {
|
||||
context.perform {
|
||||
_ = asManagedObject(context: context, associatedItemID: associatedItemID)
|
||||
let highlight = asManagedObject(context: context, associatedItemID: associatedItemID)
|
||||
let linkedItem = LinkedItem.lookup(byID: associatedItemID, inContext: context)
|
||||
linkedItem?.addToHighlights(highlight)
|
||||
|
||||
if !oldHighlightsIds.isEmpty {
|
||||
let fetchRequest: NSFetchRequest<Models.Highlight> = Highlight.fetchRequest()
|
||||
|
|
|
|||
Loading…
Reference in a new issue