Fix reaction update event when the event is not there anymore

Happens when interacting witht Mjonir quite often


(cherry picked from commit 6d3839dd42)
This commit is contained in:
Carl Schwan
2024-02-15 16:55:20 +01:00
parent 05883bcb71
commit 1ab8b85f06

View File

@@ -23,7 +23,7 @@ ReactionModel::ReactionModel(const Quotient::RoomMessageEvent *event, const NeoC
{
if (m_event != nullptr && m_room != nullptr) {
connect(m_room, &NeoChatRoom::updatedEvent, this, [this](const QString &eventId) {
if (m_event->id() == eventId) {
if (m_event && m_event->id() == eventId) {
updateReactions();
}
});