FIx desktop for android

This commit is contained in:
Jonathan Kelley committed 2023-07-05 12:49:41 -07:00
1 parent 4343abf76d
commit 2ce8ded74d
6 files changed
+42 -6

No files matched your search

+2 -1
View File
@@ -39,7 +39,8 @@ slab = { workspace = true }
futures-util = { workspace = true }
urlencoding = "2.1.2"
[target.'cfg(not(target_os = "ios"))'.dependencies]
[target.'cfg(any(target_os = "windows",target_os = "macos",target_os = "linux",target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd"))'.dependencies]
rfd = "0.11.3"
[target.'cfg(target_os = "ios")'.dependencies]
+18 -2
View File
@@ -13,12 +13,28 @@ pub(crate) struct FileDialogRequest {
pub bubbles: bool,
}
#[cfg(target_os = "ios")]
#[cfg(not(any(
target_os = "windows",
target_os = "macos",
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd"
)))]
pub(crate) fn get_file_event(_request: &FileDialogRequest) -> Vec<PathBuf> {
vec![]
}
#[cfg(not(target_os = "ios"))]
#[cfg(any(
target_os = "windows",
target_os = "macos",
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd"
))]
pub(crate) fn get_file_event(request: &FileDialogRequest) -> Vec<PathBuf> {
let mut dialog = rfd::FileDialog::new();
+9 -1
View File
@@ -113,7 +113,15 @@ impl ShortcutRegistry {
callbacks.remove(id.number);
if callbacks.is_empty() {
if let Some(_shortcut) = shortcuts.remove(&id.id) {
#[cfg(not(target_os = "ios"))]
#[cfg(any(
target_os = "windows",
target_os = "macos",
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd"
))]
let _ = self.manager.borrow_mut().unregister(_shortcut.shortcut);
}
}