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 /src/mir_app | |
parent | 17b6a94812b2dbf4af29fb5d84064ceb1c7d393e (diff) |
fixes #4555 (Задваиваются контакты протоколов, где есть кэш)
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/mir_app.def | 1 | ||||
-rw-r--r-- | src/mir_app/src/mir_app64.def | 1 | ||||
-rw-r--r-- | src/mir_app/src/proto_accs.cpp | 5 | ||||
-rw-r--r-- | src/mir_app/src/proto_interface.cpp | 8 |
4 files changed, 11 insertions, 4 deletions
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index dc1d1724a8..a719418dc2 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -985,3 +985,4 @@ g_hevEventSetJson @1109 NONAME ??_7MJsonWebSocket@@6B@ @1122 NONAME
?process@MJsonWebSocket@@EAEXPBEI@Z @1123 NONAME
_Proto_CanDeleteHistory@8 @1124 NONAME
+?OnCacheInit@PROTO_INTERFACE@@UAEXXZ @1125 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index ea04f85eaa..75f5b0c3b2 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -985,3 +985,4 @@ g_hevEventSetJson @1103 NONAME ??_7MJsonWebSocket@@6B@ @1116 NONAME
?process@MJsonWebSocket@@EEAAXPEBE_K@Z @1117 NONAME
Proto_CanDeleteHistory @1118 NONAME
+?OnCacheInit@PROTO_INTERFACE@@UEAAXXZ @1119 NONAME
diff --git a/src/mir_app/src/proto_accs.cpp b/src/mir_app/src/proto_accs.cpp index e0b3f02452..f82ca53dae 100644 --- a/src/mir_app/src/proto_accs.cpp +++ b/src/mir_app/src/proto_accs.cpp @@ -241,12 +241,13 @@ bool ActivateAccount(PROTOACCOUNT *pa, bool bIsDynamic) return false;
pa->ppro = ppi;
+ ppi->OnCacheInit();
if (bIsDynamic) {
if (g_bModulesLoadedFired)
- pa->ppro->OnModulesLoaded();
+ ppi->OnModulesLoaded();
if (!db_get_b(0, "CList", "MoveProtoMenus", true))
- pa->ppro->OnBuildProtoMenu();
+ ppi->OnBuildProtoMenu();
pa->bDynDisabled = false;
}
}
diff --git a/src/mir_app/src/proto_interface.cpp b/src/mir_app/src/proto_interface.cpp index 584c0dbe40..dd8219703d 100644 --- a/src/mir_app/src/proto_interface.cpp +++ b/src/mir_app/src/proto_interface.cpp @@ -32,9 +32,10 @@ static HGENMENU hReqAuth = nullptr, hGrantAuth = nullptr, hRevokeAuth = nullptr, /////////////////////////////////////////////////////////////////////////////////////////
// protocol constructor & destructor
-PROTO_INTERFACE::PROTO_INTERFACE(const char *pszModuleName, const wchar_t *ptszUserName)
+PROTO_INTERFACE::PROTO_INTERFACE(const char *pszModuleName, const wchar_t *ptszUserName) :
+ m_iVersion(2),
+ m_bCacheInited(false)
{
- m_iVersion = 2;
m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
m_szModuleName = mir_strdup(pszModuleName);
m_tszUserName = mir_wstrdup(ptszUserName);
@@ -77,6 +78,9 @@ CMStringW PROTO_INTERFACE::GetPreviewPath() const void PROTO_INTERFACE::OnBuildProtoMenu()
{}
+void PROTO_INTERFACE::OnCacheInit()
+{}
+
void PROTO_INTERFACE::OnContactAdded(MCONTACT)
{}
|