mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
Fix: Custom tray icon not working
1. Contains potential deadlock
This commit is contained in:
@@ -44,7 +44,6 @@ pub fn app_home_dir() -> Result<PathBuf> {
|
||||
.ok_or(anyhow::anyhow!("failed to get the portable app dir"))?;
|
||||
return Ok(PathBuf::from(app_dir).join(".config").join(APP_ID));
|
||||
}
|
||||
|
||||
let handle = handle::Handle::global();
|
||||
let app_handle = handle.app_handle.lock().clone();
|
||||
|
||||
@@ -65,7 +64,7 @@ pub fn app_home_dir() -> Result<PathBuf> {
|
||||
/// get the resources dir
|
||||
pub fn app_resources_dir() -> Result<PathBuf> {
|
||||
let handle = handle::Handle::global();
|
||||
let app_handle = handle.app_handle.lock();
|
||||
let app_handle = handle.app_handle.lock().clone();
|
||||
if let Some(app_handle) = app_handle.as_ref() {
|
||||
match app_handle.path().resource_dir() {
|
||||
Ok(dir) => {
|
||||
|
||||
Reference in New Issue
Block a user