diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-26 23:08:08 +0200 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-26 23:08:08 +0200 |
commit | 1f59c3aa32a110178d221945f362e30763cfe686 (patch) | |
tree | 8529c4ef859c250384332276fd4a0a16eff29553 | |
parent | 4e1108415aa674f80fd5f7d5d759b1c793e71fd5 (diff) |
completely fixes #1294 even if offline contacts are shown
-rw-r--r-- | src/mir_app/src/clc.h | 2 | ||||
-rw-r--r-- | src/mir_app/src/clistmod.cpp | 1 | ||||
-rw-r--r-- | src/mir_app/src/clistsettings.cpp | 7 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h index 2abed41833..7ae01bd796 100644 --- a/src/mir_app/src/clc.h +++ b/src/mir_app/src/clc.h @@ -97,6 +97,8 @@ int ClcOptInit(WPARAM wParam, LPARAM lParam); void RebuildMenuOrder(void);
/* clistsettings.c */
+void InvalidateProtoInCache(const char *szModuleName);
+
void fnGetDefaultFontSetting(int i, LOGFONT *lf, COLORREF * colour);
void fnInvalidateDisplayNameCacheEntry(MCONTACT hContact);
diff --git a/src/mir_app/src/clistmod.cpp b/src/mir_app/src/clistmod.cpp index a7f6fbf932..8dd4488972 100644 --- a/src/mir_app/src/clistmod.cpp +++ b/src/mir_app/src/clistmod.cpp @@ -173,6 +173,7 @@ static int ContactListAccountsChanged(WPARAM eventCode, LPARAM lParam) break;
case PRAC_REMOVED:
+ InvalidateProtoInCache(pa->szModuleName);
pa->iIconBase = -1;
break;
}
diff --git a/src/mir_app/src/clistsettings.cpp b/src/mir_app/src/clistsettings.cpp index ef7dc74b7b..68e4f765f8 100644 --- a/src/mir_app/src/clistsettings.cpp +++ b/src/mir_app/src/clistsettings.cpp @@ -37,6 +37,13 @@ void FreeDisplayNameCache(void) clistCache.destroy();
}
+void InvalidateProtoInCache(const char *szModuleName)
+{
+ for (auto &it : clistCache)
+ if (!mir_strcmp(it->szProto, szModuleName))
+ it->szProto = nullptr;
+}
+
// default handlers for the cache item creation and destruction
ClcCacheEntry* fnCreateCacheItem(MCONTACT hContact)
|