summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/chat_window.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-07-10 19:44:03 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-07-10 19:44:03 +0300
commita2e38963a647f9f58ff276d2ad9f89f7202c47eb (patch)
treeca043ab94971b442f02ec690d739031eee92f9c5 /plugins/TabSRMM/src/chat_window.cpp
parent18873004444063ae98a9e7fc9214bd3edaa146a7 (diff)
fixes #855 (TabSRMM - Move chat tab to another container switches chat into single conversation)
Diffstat (limited to 'plugins/TabSRMM/src/chat_window.cpp')
-rw-r--r--plugins/TabSRMM/src/chat_window.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp
index 0aa80fbfca..c13e94dc84 100644
--- a/plugins/TabSRMM/src/chat_window.cpp
+++ b/plugins/TabSRMM/src/chat_window.cpp
@@ -2396,7 +2396,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
// chat session creator
-void ShowRoom(SESSION_INFO *si)
+void ShowRoom(TContainerData *pContainer, SESSION_INFO *si)
{
if (si == nullptr)
return;
@@ -2407,9 +2407,11 @@ void ShowRoom(SESSION_INFO *si)
}
wchar_t szName[CONTAINER_NAMELEN + 2]; szName[0] = 0;
- TContainerData *pContainer = nullptr;
- if (si->pDlg != nullptr)
- pContainer = si->pDlg->m_pContainer;
+
+ if (pContainer == nullptr)
+ if (si->pDlg != nullptr)
+ pContainer = si->pDlg->m_pContainer;
+
if (pContainer == nullptr) {
GetContainerNameForContact(si->hContact, szName, CONTAINER_NAMELEN);
if (!g_Settings.bOpenInDefault && !mir_wstrcmp(szName, L"default"))
@@ -2417,6 +2419,7 @@ void ShowRoom(SESSION_INFO *si)
szName[CONTAINER_NAMELEN] = 0;
pContainer = FindContainerByName(szName);
}
+
if (pContainer == nullptr)
pContainer = CreateContainer(szName, FALSE, si->hContact);
if (pContainer == nullptr)