Make sure that the member object gets switched when a member's avatar or name is updated because the old state event will now be deleted and we need to ref the new one.
This commit is contained in:
committed by
Tobias Fella
parent
feec7ca408
commit
832e6b9de0
@@ -144,6 +144,8 @@ void UserListModel::refreshMember(const Quotient::RoomMember &member, const QLis
|
||||
{
|
||||
auto pos = findUserPos(member);
|
||||
if (pos != m_members.size()) {
|
||||
// The update will have changed the state event so we need to insert the updated member object.
|
||||
m_members.insert(pos, member);
|
||||
Q_EMIT dataChanged(index(pos), index(pos), roles);
|
||||
} else {
|
||||
qWarning() << "Trying to access a room member not in the user list";
|
||||
|
||||
Reference in New Issue
Block a user