@@ -286,21 +286,25 @@ class QueryRenderChild extends MarkdownRenderChild {
286
286
return ;
287
287
}
288
288
289
- const content = createAndAppendElement ( 'div' , this . containerEl ) ;
290
- await this . queryResultsRenderer . render ( state , tasks , content , {
291
- allTasks : this . plugin . getTasks ( ) ,
292
- allMarkdownFiles : this . app . vault . getMarkdownFiles ( ) ,
293
- backlinksClickHandler : createBacklinksClickHandler ( this . app ) ,
294
- backlinksMousedownHandler : createBacklinksMousedownHandler ( this . app ) ,
295
- editTaskPencilClickHandler : createEditTaskPencilClickHandler ( this . app ) ,
296
- } ) ;
297
-
298
- this . containerEl . firstChild ?. replaceWith ( content ) ;
289
+ await this . renderResults ( state , tasks ) ;
299
290
300
291
// Our results are now up-to-date:
301
292
this . isCacheChangedSinceLastRedraw = false ;
302
293
} ) ;
303
294
}
295
+
296
+ private async renderResults ( state : State , tasks : Task [ ] ) {
297
+ const content = createAndAppendElement ( 'div' , this . containerEl ) ;
298
+ await this . queryResultsRenderer . render ( state , tasks , content , {
299
+ allTasks : this . plugin . getTasks ( ) ,
300
+ allMarkdownFiles : this . app . vault . getMarkdownFiles ( ) ,
301
+ backlinksClickHandler : createBacklinksClickHandler ( this . app ) ,
302
+ backlinksMousedownHandler : createBacklinksMousedownHandler ( this . app ) ,
303
+ editTaskPencilClickHandler : createEditTaskPencilClickHandler ( this . app ) ,
304
+ } ) ;
305
+
306
+ this . containerEl . firstChild ?. replaceWith ( content ) ;
307
+ }
304
308
}
305
309
306
310
function createEditTaskPencilClickHandler ( app : App ) : EditButtonClickHandler {
0 commit comments