Merge multiple image uploading

kernelkind (1):
      allow multiple media uploads per selection
This commit is contained in:
William Casarin
2025-02-06 14:29:22 -08:00

View File

@@ -321,7 +321,8 @@ impl<'a> PostView<'a> {
if ui.add(media_upload_button()).clicked() { if ui.add(media_upload_button()).clicked() {
#[cfg(any(target_os = "windows", target_os = "macos", target_os = "linux"))] #[cfg(any(target_os = "windows", target_os = "macos", target_os = "linux"))]
{ {
if let Some(file) = rfd::FileDialog::new().pick_file() { if let Some(files) = rfd::FileDialog::new().pick_files() {
for file in files {
match MediaPath::new(file) { match MediaPath::new(file) {
Ok(media_path) => { Ok(media_path) => {
let promise = nostrbuild_nip96_upload( let promise = nostrbuild_nip96_upload(
@@ -339,6 +340,7 @@ impl<'a> PostView<'a> {
} }
} }
} }
}
fn transfer_uploads(&mut self, ui: &mut egui::Ui) { fn transfer_uploads(&mut self, ui: &mut egui::Ui) {
let mut indexes_to_remove = Vec::new(); let mut indexes_to_remove = Vec::new();