O(1) optimization
This commit is contained in:
parent
4d75674e8e
commit
2465201b0b
@ -176,22 +176,9 @@ class _CollapsableEmailsState extends State<CollapsableEmails> {
|
|||||||
AugmentTree temp = AugmentTree();
|
AugmentTree temp = AugmentTree();
|
||||||
temp.data = node.textContent;
|
temp.data = node.textContent;
|
||||||
temp.ogTag = node.tag;
|
temp.ogTag = node.tag;
|
||||||
if (node.tag == 'h1') {
|
//why did i do this???
|
||||||
// make this O(1)
|
if ( hirarchyDict.containsKey(node.tag)) {
|
||||||
_add2Tree(zoomTreeRoot, node);
|
_add2Tree(zoomTreeRoot, node);
|
||||||
} else if (node.tag == 'h2') {
|
|
||||||
// i dont add any since i dont have it, maybe the function makes sense
|
|
||||||
_add2Tree(zoomTreeRoot, node); // fix this
|
|
||||||
} else if (node.tag == 'h3') {
|
|
||||||
_add2Tree(zoomTreeRoot, node);
|
|
||||||
} else if (node.tag == 'h4') {
|
|
||||||
_add2Tree(zoomTreeRoot, node); // change to temp
|
|
||||||
} else if (node.tag == 'h5') {
|
|
||||||
_add2Tree(zoomTreeRoot, node);
|
|
||||||
} else if (node.tag == 'h6') {
|
|
||||||
_add2Tree(zoomTreeRoot, node); // fix this
|
|
||||||
} else if (node.tag == 'p' || node.tag == 'ul' || node.tag == 'li') {
|
|
||||||
_add2Tree(zoomTreeRoot, node); // fix this
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user