mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-28 07:14:40 +08:00
refactor: unify and simplify the call of app_handle
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use crate::config::*;
|
||||
use crate::core::handle;
|
||||
use crate::utils::{dirs, help};
|
||||
use anyhow::Result;
|
||||
use chrono::{Local, TimeZone};
|
||||
@@ -297,7 +298,9 @@ pub fn init_scheme() -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn startup_script(app_handle: &AppHandle) -> Result<()> {
|
||||
pub async fn startup_script() -> Result<()> {
|
||||
let app_handle: AppHandle = handle::Handle::global().app_handle().unwrap();
|
||||
|
||||
let script_path = {
|
||||
let verge = Config::verge();
|
||||
let verge = verge.latest();
|
||||
|
||||
Reference in New Issue
Block a user