From 5fd260b7c4c98bfa2d17a301d832a859c2af1f92 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 21 Jul 2024 16:17:48 +0300 Subject: =?UTF-8?q?fixes=20#4555=20(=D0=97=D0=B0=D0=B4=D0=B2=D0=B0=D0=B8?= =?UTF-8?q?=D0=B2=D0=B0=D1=8E=D1=82=D1=81=D1=8F=20=D0=BA=D0=BE=D0=BD=D1=82?= =?UTF-8?q?=D0=B0=D0=BA=D1=82=D1=8B=20=D0=BF=D1=80=D0=BE=D1=82=D0=BE=D0=BA?= =?UTF-8?q?=D0=BE=D0=BB=D0=BE=D0=B2,=20=D0=B3=D0=B4=D0=B5=20=D0=B5=D1=81?= =?UTF-8?q?=D1=82=D1=8C=20=D0=BA=D1=8D=D1=88)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/Import/src/import.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'plugins/Import/src/import.cpp') 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); -- cgit v1.2.3