fix(subscription): resolve issues causing import failures in some cases #4534, #4436, #4552, #4519, #4517, #4503, #4336, #4301 (#4553)

* fix(subscription): resolve issues causing import failures in some cases #4534, #4436, #4552, #4519, #4517, #4503, #4336, #4301

* fix(profile): update profile creation to include file data handling

* fix(app): improve singleton instance exit handling

* fix: remove unsued handle method
This commit is contained in:
Tunglies
2025-08-29 17:46:46 +08:00
committed by GitHub
parent a9951e4eca
commit 6eecd70bd5
11 changed files with 341 additions and 309 deletions

View File

@@ -40,8 +40,8 @@ mod app_init {
Ok(result) => {
if result.is_err() {
logging!(info, Type::Setup, true, "检测到已有应用实例运行");
if handle::Handle::global().is_initialized() {
handle::Handle::global().app_handle().unwrap().exit(0);
if let Some(app_handle) = handle::Handle::global().app_handle() {
app_handle.exit(0);
} else {
std::process::exit(0);
}
@@ -309,7 +309,7 @@ pub fn run() {
app_init::init_singleton_check();
// Initialize network manager
utils::network::NetworkManager::global().init();
utils::network::NetworkManager::new().init();
// Initialize portable flag
let _ = utils::dirs::init_portable_flag();