chore: fix conflicts count not taking into account exclusive vault mode (#2505)

This commit is contained in:
Aman Harwara
2023-09-21 20:04:05 +05:30
committed by GitHub
parent 40d45d2484
commit e36c36f401
2 changed files with 11 additions and 1 deletions

View File

@@ -31,6 +31,10 @@ export class ItemDisplayController<I extends DisplayItem, O extends AnyDisplayOp
return this.sortedItems
}
public hasExclusiveVaultOptions(): boolean {
return this.vaultOptions ? !isExclusionaryOptionsValue(this.vaultOptions.getOptions()) : false
}
public getDisplayOptions(): DisplayControllerDisplayOptions & O {
return this.options
}

View File

@@ -875,7 +875,13 @@ export class ItemManager extends Services.AbstractService implements Services.It
}
public numberOfNotesWithConflicts(): number {
return this.findItems(this.collection.uuidsOfItemsWithConflicts()).filter(Models.isNote).length
const uuids = this.collection.uuidsOfItemsWithConflicts()
const items = this.navigationDisplayController.hasExclusiveVaultOptions()
? this.navigationDisplayController
.items()
.filter((item) => Models.isNote(item) && this.collection.uuidsOfItemsWithConflicts().includes(item.uuid))
: this.findItems(uuids)
return items.length
}
getItemLinkedFiles(item: Models.DecryptedItemInterface): Models.FileItem[] {