Fix Android pick_file trait imports

AndroidFs trait must be in scope for show_open_file_dialog / read
method resolution — AndroidFsExt alone isn't enough. Matches the
existing share_file pattern that does use both traits.

Caught on the v0.6.1 Android build; previous cargo check only
validated the desktop target.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Scott Reimers 2026-04-22 18:44:58 -04:00
parent 12e0d4eccc
commit 3c5b80d017

View file

@ -1959,7 +1959,7 @@ async fn pick_file(app: tauri::AppHandle, title: String, filter_name: Option<Str
// and stage them in the app's private cache so existing import code // and stage them in the app's private cache so existing import code
// (which expects a path) can read the file normally. // (which expects a path) can read the file normally.
let _ = (title,); let _ = (title,);
use tauri_plugin_android_fs::AndroidFsExt; use tauri_plugin_android_fs::{AndroidFsExt, AndroidFs};
let mime_types: Vec<&str> = match filter_ext.as_deref() { let mime_types: Vec<&str> = match filter_ext.as_deref() {
Some(exts) if exts.iter().any(|e| e == "zip") => vec!["application/zip", "application/octet-stream"], Some(exts) if exts.iter().any(|e| e == "zip") => vec!["application/zip", "application/octet-stream"],
_ => vec!["*/*"], _ => vec!["*/*"],