reddit / node-api-client

MIT License
90 stars 30 forks source link

Comments: make comments a flat list #197

Closed curioussavage closed 7 years ago

curioussavage commented 7 years ago

To enable this I had to make new models for load more and continue thread fake comments. These are now left in the flat list instead of using flags/data on the parent to know when to show them. I tried to optimize the methods for processing comment results. Worst case would be for loadMore responses we have to iterate through the list twice to build the tree (to get depth more easily) then we iterate and walk the comment trees once to build the instantiate the models, build the flat list of comment stubs and create the dictionary of =>

.
curioussavage commented 7 years ago

:haircut_man:

schwers-zz commented 7 years ago

👓 @schwers