fix(events): remove unused refresh payloads

This commit is contained in:
Tunglies
2026-10-08 01:57:25 +08:00
parent 66a12607ce
commit 0ef96959c2
2 changed files with 9 additions and 17 deletions
+6 -14
View File
@@ -380,17 +380,9 @@ fn sample_frontend_events(uid: &String) -> Vec<(FrontendEvent<'_>, &'static str,
}
.to_view();
vec![
(
FrontendEvent::RefreshClash,
"verge://refresh-clash-config",
json!("yes"),
),
(
FrontendEvent::RefreshVerge,
"verge://refresh-verge-config",
json!("yes"),
),
(FrontendEvent::RefreshProfiles, "verge://refresh-profiles", json!("yes")),
(FrontendEvent::RefreshClash, "verge://refresh-clash-config", json!(null)),
(FrontendEvent::RefreshVerge, "verge://refresh-verge-config", json!(null)),
(FrontendEvent::RefreshProfiles, "verge://refresh-profiles", json!(null)),
(
FrontendEvent::RefreshProxyConfig,
"verge://refresh-proxy-config",
@@ -460,9 +452,9 @@ macro_rules! frontend_events {
}
frontend_events! {
refresh_clash: std::string::String = "verge://refresh-clash-config", FrontendEvent::RefreshClash => "yes".to_owned();
refresh_verge: std::string::String = "verge://refresh-verge-config", FrontendEvent::RefreshVerge => "yes".to_owned();
refresh_profiles: std::string::String = "verge://refresh-profiles", FrontendEvent::RefreshProfiles => "yes".to_owned();
refresh_clash: () = "verge://refresh-clash-config", FrontendEvent::RefreshClash => ();
refresh_verge: () = "verge://refresh-verge-config", FrontendEvent::RefreshVerge => ();
refresh_profiles: () = "verge://refresh-profiles", FrontendEvent::RefreshProfiles => ();
refresh_proxy: () = "verge://refresh-proxy-config", FrontendEvent::RefreshProxyConfig => ();
notice: (NoticeStatus, std::string::String) = "verge://notice-message", FrontendEvent::NoticeMessage { status, ref message } => (status, message.to_string());
profile_changed: std::string::String = "profile-changed", FrontendEvent::ProfileChanged { current_profile_id } => current_profile_id.to_string();
+3 -3
View File
@@ -1038,9 +1038,9 @@ export type ValidationOutcome =
export type ValidationSkipReason = 'exiting' | 'debounced'
export type VergeEventPayloads = {
'verge://refresh-clash-config': string
'verge://refresh-verge-config': string
'verge://refresh-profiles': string
'verge://refresh-clash-config': null
'verge://refresh-verge-config': null
'verge://refresh-profiles': null
'verge://refresh-proxy-config': null
'verge://notice-message': [NoticeStatus, string]
'profile-changed': string