Skip to content

Commit 648a8b0

Browse files
committed
refactor: - move addChildren() implementation to the base class
1 parent 7f13ce7 commit 648a8b0

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/Renderer/HtmlQueryResultsRenderer.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,6 @@ export class HtmlQueryResultsRenderer extends QueryResultsRendererBase {
183183
this.currentULElement().appendChild(listItem);
184184
}
185185

186-
protected async addChildren(children: ListItem[]) {
187-
if (children.length > 0) {
188-
await this.addTaskList(children);
189-
}
190-
}
191-
192186
private addEditButton(listItem: HTMLElement, task: Task) {
193187
const editTaskPencil = createAndAppendElement('a', listItem);
194188
editTaskPencil.classList.add('tasks-edit');

src/Renderer/QueryResultsRendererBase.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,11 @@ export abstract class QueryResultsRendererBase {
227227

228228
protected abstract addTask(task: Task, taskIndex: number, children: ListItem[]): Promise<void>;
229229

230-
protected abstract addChildren(listItems: ListItem[]): Promise<void>;
230+
private async addChildren(children: ListItem[]) {
231+
if (children.length > 0) {
232+
await this.addTaskList(children);
233+
}
234+
}
231235

232236
/**
233237
* Display headings for a group of tasks.

0 commit comments

Comments
 (0)