Get rid of the m_memberObjects store in MessageModel

Get rid of the m_memberObjects store in MessageModel which was missed in the last mr. Also clean up the code for NeoChatMembers
This commit is contained in:
James Graham
2025-01-05 18:52:18 +00:00
parent c21e9f2114
commit 42f9b36667
4 changed files with 7 additions and 10 deletions

View File

@@ -1743,6 +1743,10 @@ void NeoChatRoom::setRoomState(const QString &type, const QString &stateKey, con
NeochatRoomMember *NeoChatRoom::qmlSafeMember(const QString &memberId)
{
if (!isMember(memberId)) {
return nullptr;
}
if (!m_memberObjects.contains(memberId)) {
return m_memberObjects.emplace(memberId, std::make_unique<NeochatRoomMember>(this, memberId)).first->second.get();
}