diff options
Diffstat (limited to 'protocols/Telegram/src')
-rw-r--r-- | protocols/Telegram/src/main.cpp | 1 | ||||
-rw-r--r-- | protocols/Telegram/src/menus.cpp | 21 | ||||
-rw-r--r-- | protocols/Telegram/src/proto.cpp | 2 | ||||
-rw-r--r-- | protocols/Telegram/src/proto.h | 2 | ||||
-rw-r--r-- | protocols/Telegram/src/resource.h | 1 |
5 files changed, 5 insertions, 22 deletions
diff --git a/protocols/Telegram/src/main.cpp b/protocols/Telegram/src/main.cpp index 348a58e0cd..411a286ffc 100644 --- a/protocols/Telegram/src/main.cpp +++ b/protocols/Telegram/src/main.cpp @@ -43,7 +43,6 @@ static IconItem iconList[] = { LPGEN("Telegram Premium user"), "premuim", IDI_PREMIUM },
{ LPGEN("Forward"), "forward", IDI_FORWARD },
{ LPGEN("Reaction"), "reaction", IDI_REACTION },
- { LPGEN("Reply"), "reply", IDI_REPLY },
{ LPGEN("Bot"), "bot", IDI_BOT },
};
diff --git a/protocols/Telegram/src/menus.cpp b/protocols/Telegram/src/menus.cpp index ac87355f29..ded59ff5ed 100644 --- a/protocols/Telegram/src/menus.cpp +++ b/protocols/Telegram/src/menus.cpp @@ -30,7 +30,7 @@ void CTelegramProto::InitMenus() CMenuItem mi(&g_plugin); mi.pszService = szServiceName; - mi.position = 10000000; + mi.position = NS_PROTO_MENU_POS; mi.hIcolibItem = g_plugin.getIconHandle(IDI_FORWARD); mi.name.a = LPGEN("Forward"); hmiForward = Menu_AddNewStoryMenuItem(&mi, 1); @@ -39,25 +39,16 @@ void CTelegramProto::InitMenus() mi.hIcolibItem = g_plugin.getIconHandle(IDI_REACTION); mi.name.a = LPGEN("Reaction"); hmiReaction = Menu_AddNewStoryMenuItem(&mi, 2); - - mi.position++; - mi.hIcolibItem = g_plugin.getIconHandle(IDI_REPLY); - mi.name.a = LPGEN("Reply"); - hmiReply = Menu_AddNewStoryMenuItem(&mi, 3); } -int CTelegramProto::OnPrebuildNSMenu(WPARAM hContact, LPARAM lParam) +int CTelegramProto::OnPrebuildNSMenu(WPARAM hContact, LPARAM) { if (!Proto_IsProtoOnContact(hContact, m_szModuleName)) { Menu_ShowItem(hmiForward, false); Menu_ShowItem(hmiReaction, false); - Menu_ShowItem(hmiReply, false); } else { - auto *pDbei = (DB::EventInfo *)lParam; - - Menu_ShowItem(hmiForward, getByte("Protected")); - Menu_ShowItem(hmiReply, mir_strlen(pDbei->szId) > 0 && !Contact::IsReadonly(hContact)); + Menu_ShowItem(hmiForward, 0 == getByte(hContact, "Protected")); auto *pUser = FindUser(GetId(hContact)); Menu_ShowItem(hmiReaction, pUser && pUser->pReactions); @@ -195,12 +186,6 @@ INT_PTR CTelegramProto::SvcExecMenu(WPARAM iCommand, LPARAM pHandle) if (hCurrentEvent != -1) CReactionsDlg(this, hCurrentEvent).DoModal(); break; - - case 3: // reply - if (hCurrentEvent != -1) - if (auto *pDlg = NS_GetSrmm((HANDLE)pHandle)) - pDlg->SetQuoteEvent(hCurrentEvent); - break; } return 0; } diff --git a/protocols/Telegram/src/proto.cpp b/protocols/Telegram/src/proto.cpp index d23574b4e3..c7836d4e03 100644 --- a/protocols/Telegram/src/proto.cpp +++ b/protocols/Telegram/src/proto.cpp @@ -330,7 +330,7 @@ INT_PTR CTelegramProto::GetCaps(int type, MCONTACT) return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY; case PFLAGNUM_4: - return PF4_NOCUSTOMAUTH | PF4_FORCEAUTH | PF4_OFFLINEFILES | PF4_NOAUTHDENYREASON | PF4_SUPPORTTYPING | PF4_AVATARS | PF4_SERVERMSGID; + return PF4_NOCUSTOMAUTH | PF4_FORCEAUTH | PF4_OFFLINEFILES | PF4_NOAUTHDENYREASON | PF4_SUPPORTTYPING | PF4_AVATARS | PF4_SERVERMSGID | PF4_REPLY; case PFLAGNUM_5: return PF2_SHORTAWAY | PF2_LONGAWAY; diff --git a/protocols/Telegram/src/proto.h b/protocols/Telegram/src/proto.h index 172024ccdf..8cf525801a 100644 --- a/protocols/Telegram/src/proto.h +++ b/protocols/Telegram/src/proto.h @@ -327,7 +327,7 @@ class CTelegramProto : public PROTO<CTelegramProto> MCONTACT GetRealContact(const TG_USER *pUser); // Menus - HGENMENU hmiForward, hmiReaction, hmiReply; + HGENMENU hmiForward, hmiReaction; void InitMenus(); diff --git a/protocols/Telegram/src/resource.h b/protocols/Telegram/src/resource.h index ed68daa9f4..dd6b5a8f0f 100644 --- a/protocols/Telegram/src/resource.h +++ b/protocols/Telegram/src/resource.h @@ -13,7 +13,6 @@ #define IDI_REACTION 108
#define IDD_REACTIONS 109
#define IDI_BOT 110
-#define IDI_REPLY 111
#define IDD_OPTIONS_SESSIONS 112
#define IDC_PHONE 1001
#define IDC_DEFGROUP 1002
|