summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r--plugins/TabSRMM/src/contactcache.cpp6
-rw-r--r--plugins/TabSRMM/src/contactcache.h10
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);