From 5932760bd8f23aa2d53a0c2dd61801df8ed746a6 Mon Sep 17 00:00:00 2001 From: oomeow Date: Wed, 1 Oct 2025 12:34:08 +0800 Subject: [PATCH] chore: update --- src-tauri/src/core/handle.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src-tauri/src/core/handle.rs b/src-tauri/src/core/handle.rs index 98ee2658..48a739f6 100644 --- a/src-tauri/src/core/handle.rs +++ b/src-tauri/src/core/handle.rs @@ -523,13 +523,9 @@ impl Handle { impl Handle { pub fn set_activation_policy(&self, policy: tauri::ActivationPolicy) -> Result<(), String> { let app_handle = Self::app_handle(); - if let Some(app_handle) = app_handle.as_ref() { - app_handle - .set_activation_policy(policy) - .map_err(|e| e.to_string()) - } else { - Err("AppHandle not initialized".to_string()) - } + app_handle + .set_activation_policy(policy) + .map_err(|e| e.to_string()) } pub fn set_activation_policy_regular(&self) {