feat: update Cargo.toml for 2024 edition and optimize release profiles (#4681)
* feat: update Cargo.toml for 2024 edition and optimize release profiles * feat: refactor environment variable settings for Linux and improve code organization * Refactor conditional statements to use `&&` for improved readability - Updated multiple files to combine nested `if let` statements using `&&` for better clarity and conciseness. - This change enhances the readability of the code by reducing indentation levels and making the conditions more straightforward. - Affected files include: media_unlock_checker.rs, profile.rs, clash.rs, profiles.rs, async_proxy_query.rs, core.rs, handle.rs, hotkey.rs, service.rs, timer.rs, tray/mod.rs, merge.rs, seq.rs, config.rs, proxy.rs, window.rs, general.rs, dirs.rs, i18n.rs, init.rs, network.rs, and window.rs in the resolve module. * refactor: streamline conditional checks using `&&` for improved readability
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
use crate::process::AsyncHandler;
|
||||
use crate::utils::notification::{notify_event, NotificationEvent};
|
||||
use crate::utils::notification::{NotificationEvent, notify_event};
|
||||
use crate::{
|
||||
config::Config, core::handle, feat, logging, logging_error,
|
||||
module::lightweight::entry_lightweight_mode, singleton_with_logging, utils::logging::Type,
|
||||
};
|
||||
use anyhow::{bail, Result};
|
||||
use anyhow::{Result, bail};
|
||||
use parking_lot::Mutex;
|
||||
use std::{collections::HashMap, fmt, str::FromStr, sync::Arc};
|
||||
use tauri::{AppHandle, Manager};
|
||||
@@ -243,11 +243,11 @@ impl Hotkey {
|
||||
);
|
||||
|
||||
if hotkey_event_owned.key == Code::KeyQ && is_quit_owned {
|
||||
if let Some(window) = app_handle_cloned.get_webview_window("main") {
|
||||
if window.is_focused().unwrap_or(false) {
|
||||
logging!(debug, Type::Hotkey, "Executing quit function");
|
||||
Self::execute_function(function_owned, &app_handle_cloned);
|
||||
}
|
||||
if let Some(window) = app_handle_cloned.get_webview_window("main")
|
||||
&& window.is_focused().unwrap_or(false)
|
||||
{
|
||||
logging!(debug, Type::Hotkey, "Executing quit function");
|
||||
Self::execute_function(function_owned, &app_handle_cloned);
|
||||
}
|
||||
} else {
|
||||
logging!(debug, Type::Hotkey, "Executing function directly");
|
||||
|
||||
Reference in New Issue
Block a user