diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-06-19 10:39:53 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-06-19 10:39:53 +0000 |
commit | 8cc704c0ac76ac635b2ca5e40ce5a21f2686156a (patch) | |
tree | 4d4c6b9cdbb2dceabcc0c3981a789404d32d0e7d /protocols/FacebookRM/src/contacts.cpp | |
parent | 67e3f0fb7e0ace16b2aae903d7f17beea95fafe0 (diff) |
Facebook: Correctly show stopped-typing event after receive message (broken by r9482)
git-svn-id: http://svn.miranda-ng.org/main/trunk@9540 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/contacts.cpp')
-rw-r--r-- | protocols/FacebookRM/src/contacts.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp index 276c4474ae..808bdef735 100644 --- a/protocols/FacebookRM/src/contacts.cpp +++ b/protocols/FacebookRM/src/contacts.cpp @@ -413,3 +413,24 @@ int FacebookProto::OnContactDeleted(WPARAM wParam,LPARAM) return 0; } + + +void FacebookProto::StartTyping(MCONTACT hContact) { + // ignore if contact is already typing + if (facy.typing.find(hContact) != facy.typing.end()) + return; + + // show notification and insert into typing set + CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)FACEBOOK_TYPING_TIME); + facy.typing.insert(hContact); +} + +void FacebookProto::StopTyping(MCONTACT hContact) { + // ignore if contact is not typing + if (facy.typing.find(hContact) == facy.typing.end()) + return; + + // show notification and remove from typing set + CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF); + facy.typing.erase(hContact); +}
\ No newline at end of file |