Don't scroll the timeline when reacting to messages

BUG: 515306
FIXED-IN: 25.12.2
(cherry picked from commit 5de394b4b7)
This commit is contained in:
Joshua Goins
2026-01-31 13:50:40 -05:00
parent e267f9f667
commit b18c12f149

View File

@@ -5,6 +5,8 @@
#include "events/pollevent.h"
#include "messagemodel_logging.h"
#include <Quotient/events/reactionevent.h>
using namespace Quotient;
TimelineMessageModel::TimelineMessageModel(QObject *parent)
@@ -62,7 +64,10 @@ void TimelineMessageModel::connectNewRoom()
});
connect(m_room, &Room::pendingEventAdded, this, [this](const Quotient::RoomEvent *event) {
Q_EMIT newEventAdded(event);
Q_EMIT newLocalUserEventAdded();
// Don't scroll the timeline view for reactions.
if (!event->is<ReactionEvent>()) {
Q_EMIT newLocalUserEventAdded();
}
if (!m_resetting) {
beginInsertRows({}, 0, 0);
endInsertRows();