fixed issue where treeSelector was wrongly used and was not priting children events which didn't pass

This commit is contained in:
vishalxl 2022-08-26 01:23:40 +05:30
parent 58d605470f
commit c638e33b78
2 changed files with 5 additions and 7 deletions

View File

@ -1,6 +1,6 @@
// for debugging
String gCheckEventId = "a77adfe7fb19195de2f2b3393698ea37d48671b93acd47f2f3a89c60f7a012ca";
String gCheckEventId = "a4479de655094679cdfb10f347521aa58f24717cdc5ddba89fb346453a8a99ed";
const int numWaitSeconds = 3000;

View File

@ -336,18 +336,16 @@ class Tree {
bool leftShifted = false;
for( int i = 0; i < children.length; i++) {
// continue if this children isn't going to get printed anyway
//if( gDebug > 0) print("going to call tree selector");
if( !treeSelector(children[i])) {
continue;
}
if(!whetherTopMost) {
stdout.write("\n");
printDepth(depth+1);
stdout.write("|\n");
} else {
// continue if this children isn't going to get printed anyway; selector is only called for top most tree
if( !treeSelector(children[i])) {
continue;
}
Tree newestChild = children[i].getMostRecent(0);
DateTime dTime = DateTime.fromMillisecondsSinceEpoch(newestChild.e.eventData.createdAt *1000);