Skip to content

Commit 71559d6

Browse files
authored
fix app build (#6086)
1 parent 538eda6 commit 71559d6

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

apps/app/src/api/ads.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ pub struct AdsState {
1717

1818
const AD_LINK: &str = "https://modrinth.com/wrapper/app-ads-cookie";
1919
#[cfg(not(target_os = "linux"))]
20-
const APP_VERSION: &str = env!("CARGO_PKG_VERSION");
21-
#[cfg(not(target_os = "linux"))]
2220
const ADS_USER_AGENT: &str = concat!(
2321
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ",
2422
"(KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 ",
2523
"ModrinthApp/",
26-
APP_VERSION,
24+
env!("CARGO_PKG_VERSION"),
2725
" (Modrinth App)",
2826
);
2927

@@ -36,14 +34,14 @@ fn ads_user_agent_override_params() -> String {
3634
"brands": [
3735
{ "brand": "Chromium", "version": "128" },
3836
{ "brand": "Google Chrome", "version": "128" },
39-
{ "brand": "Modrinth App", "version": APP_VERSION },
37+
{ "brand": "Modrinth App", "version": env!("CARGO_PKG_VERSION") },
4038
{ "brand": "Not=A?Brand", "version": "99" },
4139
],
4240
"fullVersion": "128.0.0.0",
4341
"fullVersionList": [
4442
{ "brand": "Chromium", "version": "128.0.0.0" },
4543
{ "brand": "Google Chrome", "version": "128.0.0.0" },
46-
{ "brand": "Modrinth App", "version": APP_VERSION },
44+
{ "brand": "Modrinth App", "version": env!("CARGO_PKG_VERSION") },
4745
{ "brand": "Not=A?Brand", "version": "99.0.0.0" },
4846
],
4947
"platform": "Windows",

0 commit comments

Comments
 (0)