fix: Fixed issue where Conflicts view is shown but the list is empty
This commit is contained in:
@@ -278,7 +278,7 @@ export abstract class Collection<
|
||||
this.typedMap[element.content_type] = array
|
||||
}
|
||||
|
||||
public numberOfItemsWithConflicts(): number {
|
||||
return this.conflictMap.directMapSize
|
||||
public uuidsOfItemsWithConflicts(): string[] {
|
||||
return this.conflictMap.getAllDirectKeys()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1420,6 +1420,6 @@ export class ItemManager
|
||||
}
|
||||
|
||||
public numberOfNotesWithConflicts(): number {
|
||||
return this.collection.numberOfItemsWithConflicts()
|
||||
return this.findItems(this.collection.uuidsOfItemsWithConflicts()).filter(Models.isNote).length
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,10 @@ export class UuidMap {
|
||||
return this.directMap.get(uuid) || []
|
||||
}
|
||||
|
||||
public getAllDirectKeys(): string[] {
|
||||
return Array.from(this.directMap.keys())
|
||||
}
|
||||
|
||||
public getInverseRelationships(uuid: string): string[] {
|
||||
return this.inverseMap.get(uuid) || []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user