diff options
author | George Hazan <george.hazan@gmail.com> | 2024-07-21 16:17:48 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-07-21 16:17:48 +0300 |
commit | 5fd260b7c4c98bfa2d17a301d832a859c2af1f92 (patch) | |
tree | 648dfe9336191c8fafdf7772f376f8e60337388a /plugins/Import | |
parent | 17b6a94812b2dbf4af29fb5d84064ceb1c7d393e (diff) |
fixes #4555 (Задваиваются контакты протоколов, где есть кэш)
Diffstat (limited to 'plugins/Import')
-rw-r--r-- | plugins/Import/src/import.cpp | 16 |
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);
|