The calculated stats such as top 10 conversations were previously stored in the Program class. I moved them to the MessageSource class. It's now the source's responsibility for calculating and storing the stats. This way we got rid of the weird state in the Program class and the necessity to reset this state when changing the message source.
The calculated stats such as top 10 conversations were previously stored in the
Program
class. I moved them to theMessageSource
class. It's now the source's responsibility for calculating and storing the stats. This way we got rid of the weird state in theProgram
class and the necessity to reset this state when changing the message source.