Skip to content

Commit f368c3c

Browse files
committed
Restrict conversation rename / deletion to current conversation
These signals are sent to all conversation. Make sense to filter the correct ones.
1 parent 4c65eda commit f368c3c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

llamachateditor.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ ChatEditor::ChatEditor()
122122
&ChatManager::conversationRenamed,
123123
this,
124124
[this](const QString &convId) {
125+
if (convId != m_viewingConvId)
126+
return;
127+
125128
ViewingChat chat = ChatManager::instance().getViewingChat(convId);
126129
m_document->setPreferredDisplayName(chat.conv.name);
127130
EditorManager::instance()->updateWindowTitles();
@@ -130,6 +133,9 @@ ChatEditor::ChatEditor()
130133
&ChatManager::conversationDeleted,
131134
this,
132135
[this](const QString &convId) {
136+
if (convId != m_viewingConvId)
137+
return;
138+
133139
QString name;
134140
IEditor *ed = EditorManager::openEditorWithContents(
135141
Constants::LLAMACPP_VIEWER_ID,

0 commit comments

Comments
 (0)