Rework event handler to be just a series of static helper functions
- Clear out unused functions - All functions are now static This is because we pretty much always used it in the form: ``` EventHandler eventHandler(room, event); eventHandler.function(); ``` This simplifies it all to a single call.
This commit is contained in:
@@ -357,8 +357,7 @@ QVariant RoomTreeModel::data(const QModelIndex &index, int role) const
|
||||
if (room->lastEvent() == nullptr || room->lastEventIsSpoiler()) {
|
||||
return QString();
|
||||
}
|
||||
EventHandler eventHandler(room, room->lastEvent());
|
||||
return eventHandler.subtitleText();
|
||||
return EventHandler::subtitleText(room, room->lastEvent());
|
||||
}
|
||||
if (role == AvatarImageRole) {
|
||||
return room->avatar(128);
|
||||
|
||||
Reference in New Issue
Block a user