Refresh ShowAuthorRole when a pending event is added.

This commit is contained in:
Black Hat
2019-07-12 12:36:35 +08:00
parent a5d7dc396f
commit 18de53f49a

View File

@@ -92,8 +92,10 @@ void MessageEventModel::setRoom(SpectralRoom* room) {
});
connect(m_currentRoom, &Room::pendingEventAboutToAdd, this,
[this] { beginInsertRows({}, 0, 0); });
connect(m_currentRoom, &Room::pendingEventAdded, this,
&MessageEventModel::endInsertRows);
connect(m_currentRoom, &Room::pendingEventAdded, this, [=] {
endInsertRows();
refreshEventRoles(1, {ShowAuthorRole, BubbleShapeRole});
});
connect(m_currentRoom, &Room::pendingEventAboutToMerge, this,
[this](RoomEvent*, int i) {
if (i == 0)