Closed sebbASF closed 7 years ago
This is probably because the list of emails returned by stats.lua does not contain the body; only the top level entry in thread_struct contains the first part of the body. It would be possible to store the truncated body in the emails instead of in the thread_struct, but that would require more memory, depending on how many threads there are.
Some memory could be saved in the thread_struct table by dropping the epoch - it already looks as though the GUI has to fetch the subject from the emails table so it might as well fetch the epoch too.
Dropping the epoch would make it harder to sort the table should that be necessary.
Experiments show that the output is slightly larger if the body text is moved to the emails table. This is because most mailing lists have a multiple threads (at least when classified by subject as well as message id).
However at present the body text snippet is 300 chars. I have a wide screen, but that can only display about 180 chars even if the stats panel is closed.
Reducing the snippet to 200 chars should still allow sufficient context.
The truncation limit could be made a config item with a default of 200.
Further examination of ponymail.js shows that the flat view already uses email.body. This suggests that the intention was to provide the body excerpt for all the modes.
The threaded views both show the first line of the body (in grey) after the subject, at least in Compact theme.
Flat view does not appear to be affected by the selected theme, and does not include the subject.