fix(updater): sync release notes across update sources

This commit is contained in:
t8y2 committed 2026-07-22 11:17:29 +08:00
1 parent 68e7169f1d
commit 1b399a58d0
11 files changed
+190 -17

No files matched your search

+5 -2
View File
@@ -132,9 +132,12 @@ fn tag_version(version: &str) -> String {
}
#[tauri::command]
pub async fn check_for_updates(locale: Option<String>) -> Result<UpdateInfo, String> {
pub async fn check_for_updates(
locale: Option<String>,
source: Option<dbx_core::DownloadSource>,
) -> Result<UpdateInfo, String> {
let locale = locale.unwrap_or_else(|| "zh-CN".to_string());
let release = dbx_core::update::fetch_latest_release(&locale).await?;
let release = dbx_core::update::fetch_latest_release(&locale, source.unwrap_or_default()).await?;
let current_version = env!("CARGO_PKG_VERSION");
let mut info = dbx_core::update::build_update_info(release, current_version);
info.portable_mode = crate::data_dir::is_portable_mode();