Allow replying to messages within a thread
This commit is contained in:
committed by
Joshua Goins
parent
b88e27d6d5
commit
1f723d1fdf
@@ -113,8 +113,8 @@ void EventMessageContentModel::initializeModel()
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
#if Quotient_VERSION_MINOR > 9
|
#if Quotient_VERSION_MINOR > 9
|
||||||
connect(m_room, &Room::newThread, this, [this](const auto &newThread) {
|
connect(m_room, &Room::newThread, this, [this](const Thread &newThread) {
|
||||||
if (newThread == m_eventId) {
|
if (newThread.threadRootId == m_eventId) {
|
||||||
resetContent();
|
resetContent();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -324,7 +324,7 @@ void EventMessageContentModel::updateReplyModel()
|
|||||||
if (roomMessageEvent == nullptr) {
|
if (roomMessageEvent == nullptr) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!roomMessageEvent->isReply(m_threadsEnabled) || (roomMessageEvent->isThreaded() && m_threadsEnabled)) {
|
if (!roomMessageEvent->isReply(!m_threadsEnabled)) {
|
||||||
if (m_replyModel) {
|
if (m_replyModel) {
|
||||||
m_replyModel->disconnect(this);
|
m_replyModel->disconnect(this);
|
||||||
m_replyModel->deleteLater();
|
m_replyModel->deleteLater();
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ QQC2.Control {
|
|||||||
*
|
*
|
||||||
* @sa Quotient::RoomMember
|
* @sa Quotient::RoomMember
|
||||||
*/
|
*/
|
||||||
property var author
|
required property var author
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Whether the message author should be shown.
|
* @brief Whether the message author should be shown.
|
||||||
|
|||||||
@@ -163,8 +163,18 @@ KirigamiComponents.ConvergentContextMenu {
|
|||||||
text: i18nc("@action:inmenu", "Reply")
|
text: i18nc("@action:inmenu", "Reply")
|
||||||
icon.name: "mail-replied-symbolic"
|
icon.name: "mail-replied-symbolic"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
let threadRoot = root.room.rootIdForThread(root.eventId);
|
||||||
|
if (threadRoot.length > 0) {
|
||||||
|
root.room.threadCache.replyId = root.eventId;
|
||||||
|
root.room.threadCache.threadId = threadRoot;
|
||||||
|
root.room.mainCache.clearRelations();
|
||||||
|
root.room.editCache.clearRelations();
|
||||||
|
RoomManager.requestFullScreenClose();
|
||||||
|
return;
|
||||||
|
}
|
||||||
root.room.mainCache.replyId = root.eventId;
|
root.room.mainCache.replyId = root.eventId;
|
||||||
root.room.editCache.editId = "";
|
root.room.editCache.clearRelations();
|
||||||
|
root.room.threadCache.clearRelations();
|
||||||
RoomManager.requestFullScreenClose();
|
RoomManager.requestFullScreenClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user