diff --git a/client/htmlfilter.cpp b/client/htmlfilter.cpp index 9e78a76a..81846767 100644 --- a/client/htmlfilter.cpp +++ b/client/htmlfilter.cpp @@ -689,7 +689,7 @@ Processor::rewrite_t Processor::filterTag(QStringView tag, || (tag == u"img" && aName == u"src" && aValue.startsWith(u"mxc:")) || find(passList.begin(), passList.end(), a.qualifiedName()) != passList.end()) - rewrite.front().second.push_back(move(a)); + rewrite.front().second.push_back(std::move(a)); } // for (a: attributes) // Remove the original or if they end up without attributes diff --git a/client/models/messageeventmodel.cpp b/client/models/messageeventmodel.cpp index 37663db9..b7adbfae 100644 --- a/client/models/messageeventmodel.cpp +++ b/client/models/messageeventmodel.cpp @@ -819,8 +819,8 @@ QVariant MessageEventModel::data(const QModelIndex& idx, int role) const return settings.get("UI/show_redacted") ? EventStatus::Redacted : EventStatus::Hidden; - if (evt.isStateEvent() - && static_cast(evt).repeatsState() + if (auto* stateEvt = eventCast(&evt); + stateEvt && stateEvt->repeatsState() && !settings.get("UI/show_noop_events")) return EventStatus::Hidden; @@ -855,15 +855,15 @@ QVariant MessageEventModel::data(const QModelIndex& idx, int role) const std::vector reactions; // using vector to maintain the order // XXX: Should the list be ordered by the number of reactions instead? const auto& annotations = - m_currentRoom->relatedEvents(evt, EventRelation::Annotation()); + m_currentRoom->relatedEvents(evt, EventRelation::AnnotationType); for (const auto& a: annotations) if (const auto e = eventCast(a)) { auto rIt = std::find_if(reactions.begin(), reactions.end(), [&e] (const Reaction& r) { - return r.key == e->relation().key; + return r.key == e->key(); }); if (rIt == reactions.end()) - rIt = reactions.insert(reactions.end(), {e->relation().key}); + rIt = reactions.insert(reactions.end(), { e->key() }); rIt->authorsList << m_currentRoom->safeMemberName(e->senderId()); rIt->includesLocalUser |= diff --git a/client/timelinewidget.cpp b/client/timelinewidget.cpp index f36269d0..24da80c4 100644 --- a/client/timelinewidget.cpp +++ b/client/timelinewidget.cpp @@ -272,7 +272,7 @@ void TimelineWidget::reactionButtonClicked(const QString& eventId, for (const auto& a: annotations) if (auto* e = eventCast(a); - e != nullptr && e->relation().key == key + e != nullptr && e->key() == key && a->senderId() == currentRoom()->localUser()->id()) // { currentRoom()->redactEvent(a->id());