Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apps/rustgis-mobile/src/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,10 @@ fn use_picker<P: Phone + 'static>(
answer_ended(&answers, ended);
}));
let saver = phone.clone();
app.services.download = Some(Box::new(move |name: &str, bytes: Vec<u8>| saver.save_file(name, bytes, false)));
// The buttons' downloads are the only holder of their bytes, so nothing is copied here.
app.services.download = Some(Box::new(move |name: &str, bytes: std::sync::Arc<Vec<u8>>| {
saver.save_file(name, std::sync::Arc::unwrap_or_clone(bytes), false)
}));
let saver = phone.clone();
app.services.save_project = Some(Box::new(move |name: &str, bytes: Vec<u8>, document: Option<&str>| match document {
Some(document) => saver.write_back(document, name, bytes),
Expand Down
2 changes: 1 addition & 1 deletion apps/rustgis-web/src/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,7 @@ fn services(inbox: Inbox, font_inbox: Inbox, notes: Notes, ctx: egui::Context, e
});
})),
open_options: None,
download: Some(Box::new(|name: &str, bytes: Vec<u8>| download(name, &bytes))),
download: Some(Box::new(|name: &str, bytes: std::sync::Arc<Vec<u8>>| download(name, &bytes))),
inbox: Some(inbox),
geolibre_manifests: Some(Box::new(move |slot| crate::geolibre::manifests(slot, gl_list_ctx.clone()))),
geolibre_run: Some(Box::new(move |job, slot| crate::geolibre::run(job, slot, gl_run_ctx.clone()))),
Expand Down
393 changes: 393 additions & 0 deletions crates/data/src/capped.rs

Large diffs are not rendered by default.

Loading
Loading