Remove unused role
This commit is contained in:
@@ -46,7 +46,6 @@ QHash<int, QByteArray> MessageEventModel::roleNames() const
|
|||||||
roles[HighlightRole] = "isHighlighted";
|
roles[HighlightRole] = "isHighlighted";
|
||||||
roles[SpecialMarksRole] = "marks";
|
roles[SpecialMarksRole] = "marks";
|
||||||
roles[LongOperationRole] = "progressInfo";
|
roles[LongOperationRole] = "progressInfo";
|
||||||
roles[EventResolvedTypeRole] = "eventResolvedType";
|
|
||||||
roles[ShowLinkPreviewRole] = "showLinkPreview";
|
roles[ShowLinkPreviewRole] = "showLinkPreview";
|
||||||
roles[LinkPreviewRole] = "linkPreview";
|
roles[LinkPreviewRole] = "linkPreview";
|
||||||
roles[MediaInfoRole] = "mediaInfo";
|
roles[MediaInfoRole] = "mediaInfo";
|
||||||
@@ -597,10 +596,6 @@ QVariant MessageEventModel::data(const QModelIndex &idx, int role) const
|
|||||||
return DelegateType::Other;
|
return DelegateType::Other;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (role == EventResolvedTypeRole) {
|
|
||||||
return EventTypeRegistry::getMatrixType(evt.type());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (role == AuthorRole) {
|
if (role == AuthorRole) {
|
||||||
auto author = static_cast<NeoChatUser *>(isPending ? m_currentRoom->localUser() : m_currentRoom->user(evt.senderId()));
|
auto author = static_cast<NeoChatUser *>(isPending ? m_currentRoom->localUser() : m_currentRoom->user(evt.senderId()));
|
||||||
return userInContext(author, m_currentRoom);
|
return userInContext(author, m_currentRoom);
|
||||||
|
|||||||
@@ -96,8 +96,6 @@ public:
|
|||||||
ShowReactionsRole, /**< Whether there are any reactions to be shown. */
|
ShowReactionsRole, /**< Whether there are any reactions to be shown. */
|
||||||
SourceRole, /**< The full message source JSON. */
|
SourceRole, /**< The full message source JSON. */
|
||||||
|
|
||||||
// For debugging
|
|
||||||
EventResolvedTypeRole, /**< The event type the message. */
|
|
||||||
AuthorIdRole, /**< Matrix ID of the message author. */
|
AuthorIdRole, /**< Matrix ID of the message author. */
|
||||||
|
|
||||||
VerifiedRole, /**< Whether an encrypted message is sent in a verified session. */
|
VerifiedRole, /**< Whether an encrypted message is sent in a verified session. */
|
||||||
|
|||||||
Reference in New Issue
Block a user