diff options
author | George Hazan <ghazan@miranda.im> | 2018-10-30 13:23:54 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-10-30 13:23:54 +0300 |
commit | f307c5760e92529bf9653c528e624070b0cca2cf (patch) | |
tree | 6e1c21826353ac4a9ce0e4ce0036dd4baa92dcec /plugins/TabSRMM/src/contactcache.cpp | |
parent | 767c5e08a6e63cba75da64d2d344339ea72d70bd (diff) |
tabSRMM:
- obsolete M.GetDword & M.GetByte calls removed;
- useless m_isFavorite & m_isRecent moved from CContactCache to CMimAPI;
- other code cleaning
Diffstat (limited to 'plugins/TabSRMM/src/contactcache.cpp')
-rw-r--r-- | plugins/TabSRMM/src/contactcache.cpp | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp index 3f79b65190..195943ef1d 100644 --- a/plugins/TabSRMM/src/contactcache.cpp +++ b/plugins/TabSRMM/src/contactcache.cpp @@ -71,7 +71,6 @@ void CContactCache::initPhaseTwo() if (m_isMeta) updateMeta(); updateNick(); - updateFavorite(); } else { m_szAccount = C_INVALID_ACCOUNT; @@ -167,7 +166,7 @@ bool CContactCache::updateUIN() void CContactCache::updateStats(int iType, size_t value) { if (m_stats == nullptr) - allocStats(); + m_stats = new TSessionStats(); switch (iType) { case TSessionStats::UPDATE_WITH_LAST_RCV: @@ -192,14 +191,6 @@ void CContactCache::updateStats(int iType, size_t value) } } -void CContactCache::allocStats() -{ - if (m_stats == nullptr) { - m_stats = new TSessionStats; - memset(m_stats, 0, sizeof(TSessionStats)); - } -} - ///////////////////////////////////////////////////////////////////////////////////////// //set the window data for this contact.The window procedure of the message // dialog will use this in WM_INITDIALOG and WM_DESTROY to tell the cache @@ -390,17 +381,6 @@ void CContactCache::deletedHandler() } ///////////////////////////////////////////////////////////////////////////////////////// -// udpate favorite or recent state.runs when user manually adds -// or removes a user from that list or when database setting is -// changed from elsewhere - -void CContactCache::updateFavorite() -{ - m_isFavorite = M.GetBool(m_hContact, "isFavorite", false); - m_isRecent = M.GetDword(m_hContact, "isRecent", 0) ? true : false; -} - -///////////////////////////////////////////////////////////////////////////////////////// // update all or only the given status message information from the database // // @param szKey: char* database key name or 0 to reload all messages |