Skip to content

Commit 6221fe5

Browse files
authored
Fix build with updater feature (#5067)
1 parent 4a8f882 commit 6221fe5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

apps/app/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ fn main() {
119119
#[cfg(feature = "updater")]
120120
{
121121
use tauri_plugin_http::reqwest::header::{HeaderValue, USER_AGENT};
122-
use theseus::LAUNCHER_USER_AGENT;
122+
use theseus::launcher_user_agent;
123123
builder = builder.plugin(
124124
tauri_plugin_updater::Builder::new()
125125
.header(
126126
USER_AGENT,
127-
HeaderValue::from_str(LAUNCHER_USER_AGENT).unwrap(),
127+
HeaderValue::from_str(&launcher_user_agent()).unwrap(),
128128
)
129129
.unwrap()
130130
.build(),

apps/app/src/updater_impl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use tauri_plugin_http::reqwest::ClientBuilder;
88
use tauri_plugin_updater::Error;
99
use tauri_plugin_updater::Update;
1010
use theseus::{
11-
LAUNCHER_USER_AGENT, LoadingBarType, emit_loading, init_loading,
11+
LoadingBarType, emit_loading, init_loading, launcher_user_agent,
1212
};
1313
use tokio::time::Instant;
1414

@@ -31,7 +31,7 @@ pub async fn get_update_size<R: Runtime>(
3131
);
3232
}
3333

34-
let mut request = ClientBuilder::new().user_agent(LAUNCHER_USER_AGENT);
34+
let mut request = ClientBuilder::new().user_agent(launcher_user_agent());
3535
if let Some(timeout) = update.timeout {
3636
request = request.timeout(timeout);
3737
}

0 commit comments

Comments
 (0)