summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mir_app/src/clc.h2
-rw-r--r--src/mir_app/src/clistmod.cpp1
-rw-r--r--src/mir_app/src/clistsettings.cpp7
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)