Skip to content

Commit

Permalink
fix(List/Matrix View): 🐛 Implied siblings should be filtered by hiera…
Browse files Browse the repository at this point in the history
…rchy
  • Loading branch information
SkepticMystic committed Nov 22, 2021
1 parent 2a17ef9 commit 5403d87
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/MatrixView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ export default class MatrixView extends ItemView {
return [];
}
const { basename } = currFile;
const up = getSubInDirs(mainG, "up");

const g = getSubInDirs(mainG, "up", "down");
const closed = getReflexiveClosure(g, userHiers);
const up = getSubInDirs(closed, "up");

const realsnImplieds = getRealnImplied(plugin, basename);

Expand Down Expand Up @@ -146,7 +149,11 @@ export default class MatrixView extends ItemView {
/// Notes with the same parents

let iSameArr: internalLinkObj[] = [];
const currParents = getOutNeighbours(up, basename);
const currParents = up.hasNode(basename)
? up.filterOutNeighbors(basename, (n, a) =>
Object.values(hier).flat().includes(a.field)
)
: [];

currParents.forEach((parent) => {
let impliedSiblings = getInNeighbours(up, parent);
Expand Down

0 comments on commit 5403d87

Please sign in to comment.