From d6bc76e3d4aa9bdacd13989acde452aae86dd4c3 Mon Sep 17 00:00:00 2001 From: aliefe04 Date: Mon, 23 Mar 2026 02:10:28 +0300 Subject: [PATCH] fix: clear tray icon when unpairing the last paired client (#4890) --- src/confighttp.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/confighttp.cpp b/src/confighttp.cpp index 3d354bd39..4a0bb1280 100644 --- a/src/confighttp.cpp +++ b/src/confighttp.cpp @@ -879,7 +879,13 @@ namespace confighttp { nlohmann::json output_tree; const nlohmann::json input_tree = nlohmann::json::parse(ss); const std::string uuid = input_tree.value("uuid", ""); - output_tree["status"] = nvhttp::unpair_client(uuid); + const bool removed = nvhttp::unpair_client(uuid); + output_tree["status"] = removed; + + if (removed && nvhttp::get_all_clients().empty()) { + proc::proc.terminate(); + } + send_response(response, output_tree); } catch (std::exception &e) { BOOST_LOG(warning) << "Unpair: "sv << e.what();