fix: 启用启动器更新并修复初始化竞态
Axolotl desktop CI / guardrails (push) Has been cancelled
Axolotl desktop CI / desktop (macos-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (ubuntu-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (windows-latest) (push) Has been cancelled
Axolotl desktop CI / website (push) Has been cancelled
Repository checks / typos (push) Has been cancelled
Repository checks / tombi (push) Has been cancelled
Rust checks / shear (push) Has been cancelled
Sync source to CNB / Sync Git ref (push) Has been cancelled

This commit is contained in:
Disy committed 2026-09-26 13:06:51 +08:00
1 parent 2359b80250
commit d2a319a4d5
45 files changed
+235 -178

No files matched your search

+1
View File
@@ -547,6 +547,7 @@ fn keyring_error(
.into()
}
#[cfg(test)]
fn parse_custom_uuid(uuid: Option<String>) -> Result<Option<uuid::Uuid>> {
let Some(uuid) = uuid else {
return Ok(None);
+4 -1
View File
@@ -548,6 +548,10 @@ fn schedule_tray_menu_update(app: &AppHandle) {
});
}
pub fn state_initialized(app: &AppHandle) {
schedule_tray_menu_update(app);
}
async fn rebuild_tray_menu(
app: &AppHandle,
active: bool,
@@ -708,7 +712,6 @@ pub fn init(app: &AppHandle) {
.build(app)
.expect("failed to create system tray");
let _tray = tray;
schedule_tray_menu_update(app);
let app_handle = app.clone();
app.listen("process", move |event| {
let Ok(payload) =
+10 -4
View File
@@ -315,6 +315,8 @@ async fn initialize_state(app: tauri::AppHandle) -> api::Result<()> {
app.fs_scope()
.allow_directory(state.directories.servers_dir(), true)?;
lightweight_mode::state_initialized(&app);
Ok(())
}
@@ -569,10 +571,9 @@ fn is_dev() -> bool {
#[tauri::command]
fn are_updates_enabled() -> bool {
// Temporarily disabled: enabling the built-in updater causes an immediate
// crash on Windows (c0000409) at startup, pending a fix.
// StarLight launcher ships without the built-in update checker.
false
// The frontend waits for launcher state initialization before starting
// the built-in updater.
true
}
#[cfg(feature = "updater")]
@@ -910,6 +911,11 @@ fn main() {
Ok(())
});
#[cfg(feature = "updater")]
{
builder = builder.plugin(tauri_plugin_updater::Builder::new().build());
}
builder = builder
.plugin(api::ai::init())
.plugin(api::auth::init())
+7
View File
@@ -71,6 +71,13 @@
"schemes": ["starlight"]
},
"mobile": []
},
"updater": {
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEQ0NDhERTUxN0E3MERBNDYKUldSRzJuQjZVZDVJMUpKSUJ6blVpVzJQSTgvSjlyeVRGK0ozRzcwVWtpbTJjbUl0V0NRcC9OQVoK",
"endpoints": ["https://skin.starlight.cool/starlight/launcher/latest"],
"windows": {
"installMode": "quiet"
}
}
},
"app": {