Fix desktop showing the mobile layout: decide layout from the actual build platform (cfg!(mobile)) instead of sniffing the webview user-agent, which some WebKitGTK builds report mobile-looking (#63)

This commit is contained in:
Yuri Karamian
2026-06-11 23:35:24 +02:00
parent 15c6e6388a
commit 4aa399e96e
6 changed files with 25 additions and 5 deletions
+7
View File
@@ -2364,6 +2364,13 @@ fn save_app_config(config: &AppConfig) -> Result<(), String> {
// ── Install Type Detection ──
#[tauri::command]
pub fn is_mobile_platform() -> bool {
// Compile-time platform: true only for the Android/iOS builds. Authoritative, unlike the
// webview user-agent, which some desktop WebKitGTK builds report mobile-looking (issue #63).
cfg!(mobile)
}
#[tauri::command]
pub fn get_install_type() -> String {
// Build-time override for distro packagers (e.g. Solus): build with
+1
View File
@@ -171,6 +171,7 @@ pub fn run() {
commands::test_sync_connection,
commands::sync_now,
commands::get_install_type,
commands::is_mobile_platform,
commands::get_pending_open_file,
])
.register_asynchronous_uri_scheme_protocol("imgproxy", |_ctx, request, responder| {