summaryrefslogtreecommitdiff
path: root/protocols/VKontakte
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-08-15 13:49:37 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-08-15 13:49:37 +0300
commitf52b5cc86d9eff2494902157c8fc0a4e019a3c95 (patch)
tree9f668bf7b89decd53757589d74e476aac81eb451 /protocols/VKontakte
parentd05dd78157058eea348f0d7666c7c6b0570ef25b (diff)
fixes #799 (Crash on receiving msg in FB group chat)
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r--protocols/VKontakte/src/misc.cpp5
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp12
2 files changed, 3 insertions, 14 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index f91405128d..fc64fcaf8c 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -749,10 +749,7 @@ void CVkProto::SetSrmmReadStatus(MCONTACT hContact)
_wcsftime_l(ttime, _countof(ttime), L"%X - %x", localtime(&time), locale);
_free_locale(locale);
- StatusTextData st = { 0 };
- st.hIcon = IcoLib_GetIconByHandle(GetIconHandle(IDI_READMSG));
- mir_snwprintf(st.tszText, TranslateT("Message read: %s"), ttime);
- CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hContact, (LPARAM)&st);
+ Srmm_SetStatusText(hContact, CMStringW(FORMAT, TranslateT("Message read: %s"), ttime)), IcoLib_GetIconByHandle(GetIconHandle(IDI_READMSG));
}
void CVkProto::MarkDialogAsRead(MCONTACT hContact)
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp
index 46a09beb7a..19853e553d 100644
--- a/protocols/VKontakte/src/vk_chats.cpp
+++ b/protocols/VKontakte/src/vk_chats.cpp
@@ -840,9 +840,7 @@ void CVkProto::ChatContactTypingThread(void *p)
m_ChatsTyping.remove(cp);
m_ChatsTyping.insert(param);
- StatusTextData st = { 0 };
- mir_snwprintf(st.tszText, TranslateT("%s is typing a message..."), cu->m_wszNick);
- CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hChatContact, (LPARAM)&st);
+ Srmm_SetStatusText(hChatContact, CMStringW(FORMAT, TranslateT("%s is typing a message..."), cu->m_wszNick));
}
Sleep(9500);
@@ -869,13 +867,7 @@ void CVkProto::StopChatContactTyping(int iChatId, int iUserId)
if (cp != NULL && cp->m_UserId == iUserId) {
m_ChatsTyping.remove(cp);
-
- StatusTextData st = { 0 };
- mir_snwprintf(st.tszText, L" ");
- CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hChatContact, (LPARAM)&st);
-
- // After that I call standard cleaning procedure:
- CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hChatContact);
+ Srmm_SetStatusText(hChatContact, nullptr);
}
}