diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-21 21:29:45 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-21 21:29:45 +0300 |
commit | 6d6d050edcf0ec82c5181075878d200fafb6b27c (patch) | |
tree | ad38b5c9aa07317675689bebd5d08bbeda014cd0 /plugins/MessageState | |
parent | 9b619f0c6aa28d5f6f3568bedf14651b3a3f9b99 (diff) |
one more fix for #1853
Diffstat (limited to 'plugins/MessageState')
-rw-r--r-- | plugins/MessageState/src/messagestate.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/MessageState/src/messagestate.cpp b/plugins/MessageState/src/messagestate.cpp index 99dcd0eac4..c0ce9dd49d 100644 --- a/plugins/MessageState/src/messagestate.cpp +++ b/plugins/MessageState/src/messagestate.cpp @@ -64,7 +64,6 @@ int IconsUpdate(MCONTACT hContact) SetSRMMIcon(hContact, ICON_HIDDEN);
ExtraIconsApply(hContact, 0);
-
return 0;
}
@@ -90,6 +89,14 @@ static int OnEventFilterAdd(WPARAM hContact, LPARAM lParam) return 0;
}
+static int OnSrmmWindowOpened(WPARAM, LPARAM lParam)
+{
+ auto *pEvent = (MessageWindowEventData*)lParam;
+ if (pEvent->uType == MSG_WINDOW_EVT_OPENING)
+ IconsUpdate(pEvent->hContact);
+ return 0;
+}
+
static int OnMetaChanged(WPARAM hContact, LPARAM)
{
IconsUpdate(hContact);
@@ -102,6 +109,7 @@ int OnModulesLoaded(WPARAM, LPARAM) HookEvent(ME_DB_EVENT_FILTER_ADD, OnEventFilterAdd);
HookEvent(ME_MC_DEFAULTTCHANGED, OnMetaChanged);
HookEvent(ME_MC_SUBCONTACTSCHANGED, OnMetaChanged);
+ HookEvent(ME_MSG_WINDOWEVENT, OnSrmmWindowOpened);
g_plugin.registerIcon(MODULENAME, Icons);
|