Fix getting content models for old events in a search model
Fix getting content models for old events in a search model by allowing for calling using the event. This gets past the intial checks and the content model itself can load the event from the server. Requires network/neochat!2110 to fix the showauthor issue
This commit is contained in:
@@ -120,11 +120,7 @@ QVariant MessageModel::data(const QModelIndex &idx, int role) const
|
||||
}
|
||||
|
||||
if (role == ContentModelRole) {
|
||||
auto evtOrTxnId = event->get().id();
|
||||
if (evtOrTxnId.isEmpty()) {
|
||||
evtOrTxnId = event->get().transactionId();
|
||||
}
|
||||
return QVariant::fromValue<MessageContentModel *>(m_room->contentModelForEvent(evtOrTxnId));
|
||||
return QVariant::fromValue<MessageContentModel *>(m_room->contentModelForEvent(&event->get()));
|
||||
}
|
||||
|
||||
if (role == GenericDisplayRole) {
|
||||
|
||||
Reference in New Issue
Block a user