From c2238d3c2cef2835ffdd19e504be23a85d2fca86 Mon Sep 17 00:00:00 2001 From: Nova Date: Thu, 27 Nov 2025 18:15:44 +0330 Subject: [PATCH] Fix shadowsocks edit --- src/ui/profile/edit_shadowsocks.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/ui/profile/edit_shadowsocks.cpp b/src/ui/profile/edit_shadowsocks.cpp index c687351..265d0d5 100644 --- a/src/ui/profile/edit_shadowsocks.cpp +++ b/src/ui/profile/edit_shadowsocks.cpp @@ -19,11 +19,8 @@ void EditShadowSocks::onStart(std::shared_ptr _ent) { ui->method->setCurrentText(outbound->method); ui->uot->setCurrentIndex(outbound->uot); ui->password->setText(outbound->password); - auto ssPlugin = outbound->plugin.split(";"); - if (!ssPlugin.empty()) { - ui->plugin->setCurrentText(ssPlugin[0]); - ui->plugin_opts->setText(SubStrAfter(outbound->plugin, ";")); - } + ui->plugin->setCurrentText(outbound->plugin); + ui->plugin_opts->setText(outbound->plugin_opts); } bool EditShadowSocks::onEnd() { @@ -33,9 +30,7 @@ bool EditShadowSocks::onEnd() { outbound->password = ui->password->text(); outbound->uot = ui->uot->currentIndex(); outbound->plugin = ui->plugin->currentText(); - if (!outbound->plugin.isEmpty()) { - outbound->plugin += ";" + ui->plugin_opts->text(); - } + outbound->plugin_opts = ui->plugin_opts->text(); return true; }