Skip to content

Commit 1a2530f

Browse files
committed
Rename property name from elapsed_child to descendants
1 parent 36f9d7d commit 1a2530f

19 files changed

+6883
-29
lines changed

src/time-tree-calculator.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ export class TimeTreeCalculator {
7272
const leafNote = !fileCache || !childNotes || childNotes.length === 0;
7373
if (leafNote) {
7474
const properties =
75-
ownElapsed === 0
76-
? ["elapsed", "elapsed_child"]
77-
: ["elapsed_child"];
75+
ownElapsed === 0 ? ["elapsed", "descendants"] : ["descendants"];
7876
for (const property of properties) {
7977
await this.frontMatterManager.updateProperty(file, (fm) => {
8078
fm[property] = 0;
@@ -104,15 +102,15 @@ export class TimeTreeCalculator {
104102
const childElapsedChilds =
105103
await this.frontMatterManager.getProperty(
106104
childFile,
107-
"elapsed_child"
105+
"descendants"
108106
);
109107
childTotal = childElapsed + childElapsedChilds;
110108
}
111109
totalDescendantElapsed += childTotal;
112110
}
113111
}
114112
await this.frontMatterManager.updateProperty(file, (fm) => {
115-
fm.elapsed_child = totalDescendantElapsed;
113+
fm.descendants = totalDescendantElapsed;
116114
return fm;
117115
});
118116
return ownElapsed + totalDescendantElapsed;
@@ -224,7 +222,7 @@ export class TimeTreeCalculator {
224222
);
225223
const elapsedChild = await this.frontMatterManager.getProperty(
226224
file,
227-
"elapsed_child"
225+
"descendants"
228226
);
229227
const acc = elapsed + elapsedChild;
230228
accValues.push({ file, acc });

0 commit comments

Comments
 (0)