summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/contactcache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM/src/contactcache.cpp')
-rw-r--r--plugins/TabSRMM/src/contactcache.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp
index 6a27e4be6e..afe9bd384c 100644
--- a/plugins/TabSRMM/src/contactcache.cpp
+++ b/plugins/TabSRMM/src/contactcache.cpp
@@ -38,7 +38,7 @@ static DBCachedContact ccInvalid;
CContactCache::CContactCache(MCONTACT hContact)
{
m_hContact = hContact;
- m_wOldStatus = ID_STATUS_OFFLINE;
+ m_wStatus = m_wOldStatus = ID_STATUS_OFFLINE;
if (hContact) {
if ((cc = db_get_contact(hContact)) != NULL) {
@@ -582,3 +582,9 @@ int CContactCache::getStatus() const
{
return db_get_w(getActiveContact(), getActiveProto(), "Status", ID_STATUS_OFFLINE);
}
+
+void CContactCache::updateStatus()
+{
+ m_wOldStatus = m_wStatus;
+ m_wStatus = getStatus();
+}