Sorry, the link should be: https://github.com/dimidd/msgthr/commit/1c701717d10879d492d8b55fb8ca2f1c53d7e13f.diff
2018-01-23 23:04 GMT+02:00 Dimid Duchovny <dim...@gmail.com>: > 2018-01-22 1:49 GMT+02:00 Eric Wong <e...@80x24.org>: >> Dimid Duchovny <dim...@gmail.com> wrote: >>> However, I realized that the last step (walking) is redundant, >>> since that could be done by the library itself in the threading or >>> ordering stages. >> >> I think you want is best done in the storage/indexing stage; >> whereas msgthr is intended for display/rendering results that >> were retrieved from some sort of search engine. >> > > You're right. In my case the flow was: read emails from storage -> > group to threads -> add thread field to storage. > However, I guess it's an edge-case. > On second thought, maybe it'd be better to have a more general solution. > E.g. let the client run an arbitrary callback after adding a child. > > Here's a quick POC: > https://github.com/dimidd/msgthr/commit/1c701717d10879d492d8b55fb8ca2f1c53d7e13f > > P.S. I hope you don't mind I uploaded my fork to github.