Add more event types in eventToString().
Move eventToString() to SpectralRoom.
This commit is contained in:
@@ -256,11 +256,11 @@ QVariant MessageEventModel::data(const QModelIndex &idx, int role) const {
|
||||
const auto &evt = isPending ? **pendingIt : **timelineIt;
|
||||
|
||||
if (role == Qt::DisplayRole) {
|
||||
return utils::removeReply(utils::eventToString(evt, m_currentRoom, Qt::RichText));
|
||||
return utils::removeReply(m_currentRoom->eventToString(evt, Qt::RichText));
|
||||
}
|
||||
|
||||
if (role == MessageRole) {
|
||||
return utils::removeReply(utils::eventToString(evt, m_currentRoom));
|
||||
return utils::removeReply(m_currentRoom->eventToString(evt));
|
||||
}
|
||||
|
||||
if (role == Qt::ToolTipRole) {
|
||||
@@ -382,7 +382,7 @@ QVariant MessageEventModel::data(const QModelIndex &idx, int role) const {
|
||||
case ReplyEventIdRole:
|
||||
return replyEventId;
|
||||
case ReplyDisplayRole:
|
||||
return utils::removeReply(utils::eventToString(replyEvt, m_currentRoom, Qt::RichText));
|
||||
return utils::removeReply(m_currentRoom->eventToString(replyEvt, Qt::RichText));
|
||||
case ReplyAuthorRole:
|
||||
return QVariant::fromValue(
|
||||
m_currentRoom->user(replyEvt.senderId()));
|
||||
|
||||
Reference in New Issue
Block a user