mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-12-04 05:00:05 +08:00
refactor(profile): call the core reload directly
This commit is contained in:
@@ -3,7 +3,11 @@ use crate::process::AsyncHandler;
|
||||
use crate::singleton;
|
||||
use crate::utils::notification::{NotificationEvent, notify_event};
|
||||
use crate::utils::window_manager::WindowManager;
|
||||
use crate::{config::Config, core::handle, core::lightweight::entry_lightweight_mode, feat};
|
||||
use crate::{
|
||||
config::Config,
|
||||
core::{CoreManager, handle, lightweight::entry_lightweight_mode},
|
||||
feat,
|
||||
};
|
||||
use anyhow::{Result, bail};
|
||||
use arc_swap::ArcSwap;
|
||||
use clash_verge_logging::{Type, logging};
|
||||
@@ -165,7 +169,7 @@ impl Hotkey {
|
||||
});
|
||||
}
|
||||
HotkeyFunction::ReactivateProfiles => {
|
||||
AsyncHandler::spawn(async move || match feat::enhance_profiles().await {
|
||||
AsyncHandler::spawn(async move || match CoreManager::global().update_config_forced().await {
|
||||
Ok(outcome) if outcome.is_valid() => {
|
||||
handle::Handle::refresh_clash();
|
||||
notify_event(NotificationEvent::ProfilesReactivated).await;
|
||||
|
||||
Reference in New Issue
Block a user