Skip to content

Commit

Permalink
always surprise
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackhr-arch committed Mar 15, 2024
1 parent de5e146 commit ba9c087
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions clashtui/src/utils/tui/impl_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ impl ClashTuiUtil {
new_mode: Option<String>,
new_sysp: Option<bool>,
) -> _State {
use crate::utils::ipc;
if let Some(b) = new_sysp {
let _ = if b {
super::ipc::enable_system_proxy(&self.clash_api.proxy_addr)
ipc::enable_system_proxy(&self.clash_api.proxy_addr)
} else {
super::ipc::disable_system_proxy()
ipc::disable_system_proxy()
};
}
let (pf, mode, tun) = self._update_state(new_pf, new_mode);
let sysp = super::ipc::is_system_proxy_enabled().map_or_else(
let sysp = ipc::is_system_proxy_enabled().map_or_else(
|v| {
log::error!("{}", v);
None
Expand Down

0 comments on commit ba9c087

Please sign in to comment.