Fix clearing edit ID when an attachment is added

Fix clearing edit ID when an attachment is added. You can reply with an attachment but not edit and attachment simultaneously
This commit is contained in:
James Graham
2025-04-16 18:28:33 +00:00
parent 86f04f8b98
commit 4aec891b1f

View File

@@ -194,6 +194,11 @@ void ChatBarCache::setAttachmentPath(const QString &attachmentPath)
m_relationType = None;
const auto oldEventId = std::exchange(m_relationId, QString());
Q_EMIT relationIdChanged(oldEventId, m_relationId);
#else
if (m_relationType == Edit) {
const auto oldEventId = std::exchange(m_relationId, QString());
Q_EMIT relationIdChanged(oldEventId, m_relationId);
}
#endif
}