mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-13 05:20:28 +08:00
fix: optimize UI proxies refresh handling when first boot
This commit is contained in:
parent
1de48ca083
commit
39d8a0ee35
@ -20,5 +20,6 @@
|
||||
- 优化部分界面文案文本
|
||||
- 优化切换节点时的延迟
|
||||
- 优化托盘退出快捷键显示
|
||||
- 优化首次启动节点信息刷新
|
||||
|
||||
</details>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
use super::CmdResult;
|
||||
use crate::core::handle;
|
||||
use crate::core::sysopt::Sysopt;
|
||||
use crate::utils::resolve::ui::{self, UiReadyStage};
|
||||
use crate::{cmd::StringifyErr as _, feat, utils::dirs};
|
||||
@ -112,9 +113,14 @@ pub async fn copy_icon_file(path: String, icon_info: feat::IconInfo) -> CmdResul
|
||||
|
||||
/// 通知UI已准备就绪
|
||||
#[tauri::command]
|
||||
pub fn notify_ui_ready() {
|
||||
pub async fn notify_ui_ready() {
|
||||
logging!(info, Type::Cmd, "前端UI已准备就绪");
|
||||
ui::mark_ui_ready();
|
||||
|
||||
handle::Handle::refresh_clash();
|
||||
let delayed_refresh_delay = std::time::Duration::from_millis(1500);
|
||||
tokio::time::sleep(delayed_refresh_delay).await;
|
||||
handle::Handle::refresh_clash();
|
||||
}
|
||||
|
||||
/// UI加载阶段
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user