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 --- src/mir_app/src/mir_app.def | 1 + src/mir_app/src/mir_app64.def | 1 + src/mir_app/src/proto_accs.cpp | 5 +++-- src/mir_app/src/proto_interface.cpp | 8 ++++++-- 4 files changed, 11 insertions(+), 4 deletions(-) (limited to 'src/mir_app') 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) {} -- cgit v1.2.3