@@ -45,7 +45,7 @@ export class HtmlQueryResultsRenderer {
4545 private readonly taskLineRenderer : TaskLineRenderer ;
4646
4747 private readonly ulElementStack : HTMLUListElement [ ] = [ ] ;
48- private readonly renderedListItems : Set < ListItem > = new Set < ListItem > ( ) ;
48+ private readonly addedListItems : Set < ListItem > = new Set < ListItem > ( ) ;
4949
5050 private readonly queryRendererParameters : QueryRendererParameters ;
5151
@@ -189,7 +189,7 @@ export class HtmlQueryResultsRenderer {
189189 // will be empty, and no headings will be added.
190190 await this . addGroupHeadings ( group . groupHeadings ) ;
191191
192- this . renderedListItems . clear ( ) ;
192+ this . addedListItems . clear ( ) ;
193193 // TODO re-extract the method to include this back
194194 const taskList = createAndAppendElement ( 'ul' , this . getContent ( ) ) ;
195195 this . ulElementStack . push ( taskList ) ;
@@ -251,11 +251,11 @@ export class HtmlQueryResultsRenderer {
251251 */
252252 private async addTreeTaskList ( listItems : ListItem [ ] ) : Promise < void > {
253253 for ( const [ listItemIndex , listItem ] of listItems . entries ( ) ) {
254- if ( this . alreadyRendered ( listItem ) ) {
254+ if ( this . alreadyAdded ( listItem ) ) {
255255 continue ;
256256 }
257257
258- if ( this . willBeRenderedLater ( listItem , listItems ) ) {
258+ if ( this . willBeAddedLater ( listItem , listItems ) ) {
259259 continue ;
260260 }
261261
@@ -264,21 +264,21 @@ export class HtmlQueryResultsRenderer {
264264 } else {
265265 await this . addListItem ( listItem , listItemIndex , listItem . children ) ;
266266 }
267- this . renderedListItems . add ( listItem ) ;
267+ this . addedListItems . add ( listItem ) ;
268268
269269 for ( const childTask of listItem . children ) {
270- this . renderedListItems . add ( childTask ) ;
270+ this . addedListItems . add ( childTask ) ;
271271 }
272272 }
273273 }
274274
275- private willBeRenderedLater ( listItem : ListItem , listItems : ListItem [ ] ) {
275+ private willBeAddedLater ( listItem : ListItem , listItems : ListItem [ ] ) {
276276 const closestParentTask = listItem . findClosestParentTask ( ) ;
277277 if ( ! closestParentTask ) {
278278 return false ;
279279 }
280280
281- if ( ! this . renderedListItems . has ( closestParentTask ) ) {
281+ if ( ! this . addedListItems . has ( closestParentTask ) ) {
282282 // This task is a direct or indirect child of another task that we are waiting to draw,
283283 // so don't draw it yet, it will be done recursively later.
284284 if ( listItems . includes ( closestParentTask ) ) {
@@ -289,8 +289,8 @@ export class HtmlQueryResultsRenderer {
289289 return false ;
290290 }
291291
292- private alreadyRendered ( listItem : ListItem ) {
293- return this . renderedListItems . has ( listItem ) ;
292+ private alreadyAdded ( listItem : ListItem ) {
293+ return this . addedListItems . has ( listItem ) ;
294294 }
295295
296296 private async addListItem ( listItem : ListItem , listItemIndex : number , children : ListItem [ ] ) : Promise < void > {
0 commit comments