From f67cd7deb5966011764689de60eb6a1103c77f84 Mon Sep 17 00:00:00 2001 From: James Graham Date: Tue, 26 Sep 2023 20:21:08 +0000 Subject: [PATCH] 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. --- src/models/messageeventmodel.cpp | 5 ----- src/models/messageeventmodel.h | 2 -- 2 files changed, 7 deletions(-) diff --git a/src/models/messageeventmodel.cpp b/src/models/messageeventmodel.cpp index 19dc6d455..49d546cf2 100644 --- a/src/models/messageeventmodel.cpp +++ b/src/models/messageeventmodel.cpp @@ -55,7 +55,6 @@ QHash MessageEventModel::roleNames() const roles[ShowReadMarkersRole] = "showReadMarkers"; roles[ReactionRole] = "reaction"; roles[ShowReactionsRole] = "showReactions"; - roles[AuthorIdRole] = "authorId"; roles[VerifiedRole] = "verified"; roles[AuthorDisplayNameRole] = "authorDisplayName"; roles[IsRedactedRole] = "isRedacted"; @@ -659,10 +658,6 @@ QVariant MessageEventModel::data(const QModelIndex &idx, int role) const return m_reactionModels.contains(evt.id()); } - if (role == AuthorIdRole) { - return evt.senderId(); - } - if (role == VerifiedRole) { if (evt.originalEvent()) { auto encrypted = dynamic_cast(evt.originalEvent()); diff --git a/src/models/messageeventmodel.h b/src/models/messageeventmodel.h index c436b0b74..15df90d0b 100644 --- a/src/models/messageeventmodel.h +++ b/src/models/messageeventmodel.h @@ -73,8 +73,6 @@ public: ReactionRole, /**< List model for this event. */ 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. */ AuthorDisplayNameRole, /**< The displayname for the event's sender; for name change events, the old displayname. */ IsRedactedRole, /**< Whether an event has been deleted. */