Remove the now unused author ID role from MessageEventModel
Remove the now unused author ID role from `MessageEventModel`. This can be obtained from the author roles object.
This commit is contained in:
@@ -55,7 +55,6 @@ QHash<int, QByteArray> MessageEventModel::roleNames() const
|
|||||||
roles[ShowReadMarkersRole] = "showReadMarkers";
|
roles[ShowReadMarkersRole] = "showReadMarkers";
|
||||||
roles[ReactionRole] = "reaction";
|
roles[ReactionRole] = "reaction";
|
||||||
roles[ShowReactionsRole] = "showReactions";
|
roles[ShowReactionsRole] = "showReactions";
|
||||||
roles[AuthorIdRole] = "authorId";
|
|
||||||
roles[VerifiedRole] = "verified";
|
roles[VerifiedRole] = "verified";
|
||||||
roles[AuthorDisplayNameRole] = "authorDisplayName";
|
roles[AuthorDisplayNameRole] = "authorDisplayName";
|
||||||
roles[IsRedactedRole] = "isRedacted";
|
roles[IsRedactedRole] = "isRedacted";
|
||||||
@@ -659,10 +658,6 @@ QVariant MessageEventModel::data(const QModelIndex &idx, int role) const
|
|||||||
return m_reactionModels.contains(evt.id());
|
return m_reactionModels.contains(evt.id());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (role == AuthorIdRole) {
|
|
||||||
return evt.senderId();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (role == VerifiedRole) {
|
if (role == VerifiedRole) {
|
||||||
if (evt.originalEvent()) {
|
if (evt.originalEvent()) {
|
||||||
auto encrypted = dynamic_cast<const EncryptedEvent *>(evt.originalEvent());
|
auto encrypted = dynamic_cast<const EncryptedEvent *>(evt.originalEvent());
|
||||||
|
|||||||
@@ -73,8 +73,6 @@ public:
|
|||||||
ReactionRole, /**< List model for this event. */
|
ReactionRole, /**< List model for this event. */
|
||||||
ShowReactionsRole, /**< Whether there are any reactions to be shown. */
|
ShowReactionsRole, /**< Whether there are any reactions to be shown. */
|
||||||
|
|
||||||
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. */
|
||||||
AuthorDisplayNameRole, /**< The displayname for the event's sender; for name change events, the old displayname. */
|
AuthorDisplayNameRole, /**< The displayname for the event's sender; for name change events, the old displayname. */
|
||||||
IsRedactedRole, /**< Whether an event has been deleted. */
|
IsRedactedRole, /**< Whether an event has been deleted. */
|
||||||
|
|||||||
Reference in New Issue
Block a user