chore: fix issue where child tags would get hidden in exclusive vault mode if parent tag is in different vault (#2502)

This commit is contained in:
Aman Harwara
2023-09-15 16:28:16 +05:30
committed by GitHub
parent 2ecd6cf5cd
commit 520bede842
3 changed files with 14 additions and 1 deletions

View File

@@ -640,6 +640,18 @@ export class ItemManager extends Services.AbstractService implements Services.It
return undefined
}
getDisplayableTagParent(itemToLookupUuidFor: Models.SNTag): Models.SNTag | undefined {
const tag = this.findItem<Models.SNTag>(itemToLookupUuidFor.uuid)
if (!tag) {
return undefined
}
const parentId = tag.parentId
if (parentId) {
return this.tagDisplayController.items().find((displayableTag) => displayableTag.uuid === parentId)
}
return undefined
}
public getTagPrefixTitle(tag: Models.SNTag): string | undefined {
const hierarchy = this.getTagParentChain(tag)