bug 修复
This commit is contained in:
parent
e628e21d99
commit
412c676144
2 changed files with 9 additions and 3 deletions
|
@ -48,9 +48,10 @@ pub struct Core {
|
|||
impl Core {
|
||||
pub fn new() -> Core {
|
||||
let clash = Clash::new();
|
||||
let verge = Verge::new();
|
||||
let mut verge = Verge::new();
|
||||
let profiles = Profiles::new();
|
||||
let service = Service::new();
|
||||
verge.launch_flag = Some(true);
|
||||
|
||||
Core {
|
||||
clash: Arc::new(Mutex::new(clash)),
|
||||
|
@ -382,10 +383,11 @@ impl Core {
|
|||
result.error.map(|err| log::error!("{err}"));
|
||||
});
|
||||
|
||||
let verge = self.verge.lock();
|
||||
let mut verge = self.verge.lock();
|
||||
let silent_start = verge.enable_silent_start.clone();
|
||||
if silent_start.unwrap_or(false) {
|
||||
if silent_start.unwrap_or(false) && verge.launch_flag.unwrap_or(false) {
|
||||
window.emit("script-handler-close", payload).unwrap();
|
||||
verge.launch_flag = Some(false);
|
||||
} else {
|
||||
window.emit("script-handler", payload).unwrap();
|
||||
}
|
||||
|
|
|
@ -37,6 +37,10 @@ pub struct Verge {
|
|||
/// enable proxy guard
|
||||
pub enable_proxy_guard: Option<bool>,
|
||||
|
||||
/// launch flag
|
||||
#[serde(skip_serializing)]
|
||||
pub launch_flag: Option<bool>,
|
||||
|
||||
/// set system proxy bypass
|
||||
pub system_proxy_bypass: Option<String>,
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue