diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-09-05 10:32:23 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-09-05 10:32:23 +0000 |
commit | e6f8893e9baf6ee75f9fd4a7d1b2be91cd687624 (patch) | |
tree | e342b3607653dc4f3024f2a8e2b16eef6ef7ffc4 | |
parent | 3e66e9b159ce9ef494bd2caedf36481a952acd4a (diff) |
MessageState: small fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@15252 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/MessageState/src/messagestate.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/MessageState/src/messagestate.cpp b/plugins/MessageState/src/messagestate.cpp index d1cd032e36..57dd44824e 100644 --- a/plugins/MessageState/src/messagestate.cpp +++ b/plugins/MessageState/src/messagestate.cpp @@ -139,9 +139,12 @@ int OnSrmmWindowEvent(WPARAM, LPARAM lParam) INT_PTR UpdateService(WPARAM hContact, LPARAM lParam)
{
MessageReadData *mrd = (MessageReadData*)lParam;
- db_set_dw(hContact, MODULENAME, DBKEY_MESSAGE_READ_TIME, mrd->dw_lastTime);
- db_set_dw(hContact, MODULENAME, DBKEY_MESSAGE_READ_TIME_TYPE, mrd->iTimeType);
- IconsUpdate(hContact, mrd->dw_lastTime);
+ if (mrd->dw_lastTime > db_get_dw(hContact, MODULENAME, DBKEY_MESSAGE_READ_TIME, 0))
+ {
+ db_set_dw(hContact, MODULENAME, DBKEY_MESSAGE_READ_TIME, mrd->dw_lastTime);
+ db_set_dw(hContact, MODULENAME, DBKEY_MESSAGE_READ_TIME_TYPE, mrd->iTimeType);
+ IconsUpdate(hContact, mrd->dw_lastTime);
+ }
return 0;
}
|