diff options
author | George Hazan <ghazan@miranda.im> | 2018-10-31 17:46:32 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-10-31 17:46:32 +0300 |
commit | 7bdaaf97bc309212bab3a49d4e70af69222208fd (patch) | |
tree | 12df76456c6ead92a023f1f229e0a33392c75ee1 | |
parent | 5cfe759310f1368eb5bcd3ed07918a61768f7cde (diff) |
tabSRMM: old code returned
-rw-r--r-- | plugins/TabSRMM/src/contactcache.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/contactcache.h | 10 |
2 files changed, 6 insertions, 10 deletions
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp index 195943ef1d..3c35dbede5 100644 --- a/plugins/TabSRMM/src/contactcache.cpp +++ b/plugins/TabSRMM/src/contactcache.cpp @@ -536,7 +536,7 @@ size_t CContactCache::getMaxMessageLength() bool CContactCache::updateStatus(int iStatus) { - bool bRet = m_iOldStatus != iStatus; - m_iOldStatus = iStatus; - return bRet; + m_iOldStatus = m_iStatus; + m_iStatus = iStatus; + return m_iOldStatus != iStatus; } diff --git a/plugins/TabSRMM/src/contactcache.h b/plugins/TabSRMM/src/contactcache.h index a538ab5579..e0e8254af4 100644 --- a/plugins/TabSRMM/src/contactcache.h +++ b/plugins/TabSRMM/src/contactcache.h @@ -60,7 +60,7 @@ struct TSessionStats : public MZeroedObject class CContactCache : public MZeroedObject
{
MCONTACT m_hContact, m_hSub;
- int m_iOldStatus = ID_STATUS_OFFLINE, m_iMetaStatus;
+ int m_iStatus = ID_STATUS_OFFLINE, m_iOldStatus = ID_STATUS_OFFLINE, m_iMetaStatus;
char *m_szMetaProto;
wchar_t *m_szAccount;
wchar_t m_szNick[80], m_szUIN[80];
@@ -89,7 +89,8 @@ public: }
__forceinline bool isValid() const { return m_isValid; }
- __forceinline int getActiveStatus() const { return m_isMeta ? m_iMetaStatus : getStatus(); }
+ __forceinline int getActiveStatus() const { return m_isMeta ? m_iMetaStatus : m_iStatus; }
+ __forceinline int getStatus(void) const { return m_iStatus; }
__forceinline int getOldStatus() const { return m_iOldStatus; }
__forceinline LPCWSTR getNick() const { return m_szNick; }
__forceinline MCONTACT getContact() const { return m_hContact; }
@@ -113,11 +114,6 @@ public: __forceinline CSrmmWindow* getDat() const { return m_dat; }
- int getStatus(void) const
- {
- return db_get_w(m_hContact, cc->szProto, "Status", ID_STATUS_OFFLINE);
- }
-
size_t getMaxMessageLength();
void updateStats(int iType, size_t value = 0);
|