Revert "feat: update Cargo.toml for 2024 edition and optimize release profiles (#4681)"

This reverts commit 31e3104c7f.
This commit is contained in:
Tunglies
2025-09-08 21:48:09 +08:00
Unverified
parent 31e3104c7f
commit 55b95a1985
51 changed files with 793 additions and 782 deletions

View File

@@ -3,7 +3,7 @@ use tauri::AppHandle;
use crate::{
config::Config,
core::{CoreManager, Timer, handle, hotkey::Hotkey, sysopt, tray::Tray},
core::{handle, hotkey::Hotkey, sysopt, tray::Tray, CoreManager, Timer},
logging, logging_error,
module::lightweight::auto_lightweight_mode_init,
process::AsyncHandler,

View File

@@ -1,4 +1,4 @@
use anyhow::{Result, bail};
use anyhow::{bail, Result};
use percent_encoding::percent_decode_str;
use tauri::Url;

View File

@@ -1,8 +1,8 @@
use once_cell::sync::OnceCell;
use parking_lot::RwLock;
use std::sync::{
Arc,
atomic::{AtomicBool, Ordering},
Arc,
};
use tokio::sync::Notify;

View File

@@ -12,7 +12,7 @@ use crate::{
utils::{
logging::Type,
resolve::{
ui::{UiReadyStage, get_ui_ready, update_ui_ready_stage, wait_for_ui_ready},
ui::{get_ui_ready, update_ui_ready_stage, wait_for_ui_ready, UiReadyStage},
window_script::{INITIAL_LOADING_OVERLAY, WINDOW_INITIAL_SCRIPT},
},
},
@@ -34,22 +34,22 @@ fn get_window_creating_lock() -> &'static Mutex<(bool, Instant)> {
/// 检查是否已存在窗口,如果存在则显示并返回 true
fn check_existing_window(is_show: bool) -> Option<bool> {
if let Some(app_handle) = handle::Handle::global().app_handle()
&& let Some(window) = app_handle.get_webview_window("main")
{
logging!(info, Type::Window, true, "主窗口已存在,将显示现有窗口");
if is_show {
if window.is_minimized().unwrap_or(false) {
logging!(info, Type::Window, true, "窗口已最小化,正在取消最小化");
let _ = window.unminimize();
}
let _ = window.show();
let _ = window.set_focus();
if let Some(app_handle) = handle::Handle::global().app_handle() {
if let Some(window) = app_handle.get_webview_window("main") {
logging!(info, Type::Window, true, "主窗口已存在,将显示现有窗口");
if is_show {
if window.is_minimized().unwrap_or(false) {
logging!(info, Type::Window, true, "窗口已最小化,正在取消最小化");
let _ = window.unminimize();
}
let _ = window.show();
let _ = window.set_focus();
#[cfg(target_os = "macos")]
handle::Handle::global().set_activation_policy_regular();
#[cfg(target_os = "macos")]
handle::Handle::global().set_activation_policy_regular();
}
return Some(true);
}
return Some(true);
}
None
}