mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
fix: performance issues caused by closing windows on mac
This commit is contained in:
@@ -30,9 +30,12 @@ impl Handle {
|
||||
}
|
||||
|
||||
pub fn get_window(&self) -> Option<WebviewWindow> {
|
||||
self.app_handle()
|
||||
.as_ref()
|
||||
.and_then(|a| a.get_webview_window("main"))
|
||||
let app_handle = self.app_handle().unwrap();
|
||||
let window: Option<WebviewWindow> = app_handle.get_webview_window("main");
|
||||
if window.is_none() {
|
||||
log::debug!(target:"app", "main window not found");
|
||||
}
|
||||
window
|
||||
}
|
||||
|
||||
pub fn refresh_clash() {
|
||||
|
||||
Reference in New Issue
Block a user