Finish PM composer cleanup and skip history requests after shutdown

This commit is contained in:
evgeny committed 2026-10-26 22:11:39 +01:00
1 parent f83033d3a1
commit e88f3ce46a
2 files changed
+5

No files matched your search

+2
View File
@@ -495,6 +495,8 @@ void InputBar::forgetDmHistory(const QString& target, quint64 generation) {
m_pttActive = false;
if (m_recorder && m_recorder->isRecording()) m_recorder->stopRecording();
m_recordTarget.clear(); m_recordReply.clear(); m_recordDmGeneration = 0;
m_pttBtn->setStyleSheet("QPushButton { border: none; border-radius: 4px; background: transparent; }"
"QPushButton:hover { background: palette(light); }");
}
if (m_channelIdForRecord == target && m_dmGeneration == generation) {
++m_attachmentContext; clearPendingAttachment(); clearReply(); m_input->clear();
+3
View File
@@ -1493,6 +1493,9 @@ QString MessageList::dmConvId(const QString& channelId) {
void MessageList::requestDmMessages(const QString& channelId) {
if (!m_currentDmGeneration || m_dmDeleting.value(dmConvId(channelId)) == m_currentDmGeneration) return;
if (!gui_bridge_get_inst() || !gui_bridge_is_uasync_ready()) {
GUI_WARN("PM history request skipped: core unavailable target=%s", qPrintable(channelId)); return;
}
QString conv = dmConvId(channelId);
struct dm_messages_req* req = (struct dm_messages_req*)u_malloc(sizeof(*req));
if (!req) return;