From 4dd7b7523237281916b81cf614f349de273df35e Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Thu, 15 Feb 2024 20:11:47 -0800 Subject: [PATCH] don't show item notifs option on ep3 --- src/ProxyServer.cc | 3 +-- src/ReceiveCommands.cc | 14 ++++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/ProxyServer.cc b/src/ProxyServer.cc index c16631bf..da68dd42 100644 --- a/src/ProxyServer.cc +++ b/src/ProxyServer.cc @@ -681,8 +681,7 @@ ProxyServer::LinkedSession::SavingFile::SavingFile( is_download(is_download), remaining_bytes(remaining_bytes) {} -void ProxyServer::LinkedSession::dispatch_on_timeout( - evutil_socket_t, short, void* ctx) { +void ProxyServer::LinkedSession::dispatch_on_timeout(evutil_socket_t, short, void* ctx) { reinterpret_cast(ctx)->on_timeout(); } diff --git a/src/ReceiveCommands.cc b/src/ReceiveCommands.cc index 9f3be954..d7ab8e6e 100644 --- a/src/ReceiveCommands.cc +++ b/src/ReceiveCommands.cc @@ -50,12 +50,14 @@ static shared_ptr proxy_options_menu_for_client(shared_ptrconfig.check_flag(Client::Flag::ALL_DROP_NOTIFICATIONS_ENABLED)) { - ret->items.emplace_back(ProxyOptionsMenuItemID::DROP_NOTIFICATIONS, "All drop notifs", item_drop_notifs_description, 0); - } else if (c->config.check_flag(Client::Flag::RARE_DROP_NOTIFICATIONS_ENABLED)) { - ret->items.emplace_back(ProxyOptionsMenuItemID::DROP_NOTIFICATIONS, "Rare drop notifs", item_drop_notifs_description, 0); - } else { - ret->items.emplace_back(ProxyOptionsMenuItemID::DROP_NOTIFICATIONS, "No drop notifs", item_drop_notifs_description, 0); + if (!is_ep3(c->version())) { + if (c->config.check_flag(Client::Flag::ALL_DROP_NOTIFICATIONS_ENABLED)) { + ret->items.emplace_back(ProxyOptionsMenuItemID::DROP_NOTIFICATIONS, "All drop notifs", item_drop_notifs_description, 0); + } else if (c->config.check_flag(Client::Flag::RARE_DROP_NOTIFICATIONS_ENABLED)) { + ret->items.emplace_back(ProxyOptionsMenuItemID::DROP_NOTIFICATIONS, "Rare drop notifs", item_drop_notifs_description, 0); + } else { + ret->items.emplace_back(ProxyOptionsMenuItemID::DROP_NOTIFICATIONS, "No drop notifs", item_drop_notifs_description, 0); + } } add_flag_option(ProxyOptionsMenuItemID::BLOCK_PINGS, Client::Flag::PROXY_SUPPRESS_CLIENT_PINGS, "Block pings", "Block ping commands\nsent by the client");