chore: fix conflicts count not taking into account exclusive vault mode (#2505)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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[] {
|
||||
|
||||
Reference in New Issue
Block a user