Never refresh the author role except when a member updated signal is generated. This should remove a potential source of crashes where a RoomMember object tries to access an already deleted room member state event

This commit is contained in:
James Graham
2024-07-07 14:02:43 +01:00
parent ea1b577ec7
commit 8751f6fea7
2 changed files with 12 additions and 15 deletions

View File

@@ -107,10 +107,6 @@ public:
protected:
bool event(QEvent *event) override;
private Q_SLOTS:
int refreshEvent(const QString &eventId);
void refreshRow(int row);
private:
QPointer<NeoChatRoom> m_currentRoom = nullptr;
QString lastReadEventId;
@@ -128,6 +124,7 @@ private:
bool canFetchMore(const QModelIndex &parent) const override;
void fetchMore(const QModelIndex &parent) override;
void fullEventRefresh(int row);
void refreshLastUserEvents(int baseTimelineRow);
void refreshEventRoles(int row, const QList<int> &roles = {});
int refreshEventRoles(const QString &eventId, const QList<int> &roles = {});