diff options
Diffstat (limited to 'plugins/MessageState/src/messagestate.cpp')
-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;
}
|