Refactor reactions

Currently we effectively create the reactions list in EventHandler then pass that data into a model. This reworks the model so that we just pass in a room and an event and it grabs it's own data. This means that:
- the functions in event handler are no longer required
- the model can update itself to add/remove reactions so no need to handle that in MessageEventModel
- MessageEventModel only needs to create new ReactionModels or remove old ones when no reactions exist anymore

A basic test suite has also been created for the ReactionModel
This commit is contained in:
James Graham
2024-01-06 17:50:32 +00:00
parent ad083f64b1
commit fad381c36f
11 changed files with 454 additions and 130 deletions

View File

@@ -131,6 +131,7 @@ private:
QString lastReadEventId;
QPersistentModelIndex m_lastReadEventIndex;
int rowBelowInserted = -1;
bool resetting = false;
bool movingEvent = false;
KFormat m_format;