summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Import/src/import.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp
index 1297462e3d..e40546ba57 100644
--- a/plugins/Import/src/import.cpp
+++ b/plugins/Import/src/import.cpp
@@ -1058,6 +1058,22 @@ void CImportBatch::DoImport()
AddMessage(L"");
dstDb->Flush();
+ // Create contact's cache for new accounts
+ {
+ int protoCount;
+ PROTOACCOUNT **accs;
+ Proto_EnumAccounts(&protoCount, &accs);
+
+ for (int i = 0; i < protoCount; i++) {
+ auto *pa = accs[i];
+
+ if (!pa->ppro)
+ continue;
+ if (!pa->ppro->m_bCacheInited)
+ pa->ppro->OnCacheInit();
+ }
+ }
+
// Restore database writing mode
dstDb->SetCacheSafetyMode(TRUE);
db_setCurrent(dstDb);