mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 17:15:38 +08:00
Revert "refactor: profile switch (#5197)"
This reverts commit c2dcd86722.
This commit is contained in:
@@ -194,7 +194,6 @@ mod app_init {
|
||||
cmd::get_profiles,
|
||||
cmd::enhance_profiles,
|
||||
cmd::patch_profiles_config,
|
||||
cmd::switch_profile,
|
||||
cmd::view_profile,
|
||||
cmd::patch_profile,
|
||||
cmd::create_profile,
|
||||
@@ -205,8 +204,6 @@ mod app_init {
|
||||
cmd::read_profile_file,
|
||||
cmd::save_profile_file,
|
||||
cmd::get_next_update_time,
|
||||
cmd::get_profile_switch_status,
|
||||
cmd::get_profile_switch_events,
|
||||
cmd::script_validate_notice,
|
||||
cmd::validate_script_file,
|
||||
cmd::create_local_backup,
|
||||
@@ -223,7 +220,6 @@ mod app_init {
|
||||
cmd::get_system_info,
|
||||
cmd::get_unlock_items,
|
||||
cmd::check_media_unlock,
|
||||
cmd::frontend_log,
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -362,28 +358,6 @@ pub fn run() {
|
||||
}
|
||||
}
|
||||
|
||||
std::panic::set_hook(Box::new(|info| {
|
||||
let payload = info
|
||||
.payload()
|
||||
.downcast_ref::<&'static str>()
|
||||
.map(|s| (*s).to_string())
|
||||
.or_else(|| info.payload().downcast_ref::<String>().cloned())
|
||||
.unwrap_or_else(|| "Unknown panic".to_string());
|
||||
let location = info
|
||||
.location()
|
||||
.map(|loc| format!("{}:{}", loc.file(), loc.line()))
|
||||
.unwrap_or_else(|| "unknown location".to_string());
|
||||
|
||||
logging!(
|
||||
error,
|
||||
Type::System,
|
||||
"Rust panic captured: {} @ {}",
|
||||
payload,
|
||||
location
|
||||
);
|
||||
handle::Handle::notify_rust_panic(payload.into(), location.into());
|
||||
}));
|
||||
|
||||
#[cfg(feature = "clippy")]
|
||||
let context = tauri::test::mock_context(tauri::test::noop_assets());
|
||||
#[cfg(feature = "clippy")]
|
||||
|
||||
Reference in New Issue
Block a user