notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 0d22debb05bc46b21106a3cd0d1df22735bea411
parent 36dc28451a24dfbe016562c506065bf760ce45b1
Author: William Casarin <jb55@jb55.com>
Date:   Thu,  6 Feb 2025 14:29:22 -0800

Merge multiple image uploading

kernelkind (1):
      allow multiple media uploads per selection

Diffstat:
Mcrates/notedeck_columns/src/ui/note/post.rs | 26++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/crates/notedeck_columns/src/ui/note/post.rs b/crates/notedeck_columns/src/ui/note/post.rs @@ -321,18 +321,20 @@ impl<'a> PostView<'a> { if ui.add(media_upload_button()).clicked() { #[cfg(any(target_os = "windows", target_os = "macos", target_os = "linux"))] { - if let Some(file) = rfd::FileDialog::new().pick_file() { - match MediaPath::new(file) { - Ok(media_path) => { - let promise = nostrbuild_nip96_upload( - self.poster.secret_key.secret_bytes(), - media_path, - ); - self.draft.uploading_media.push(promise); - } - Err(e) => { - error!("{e}"); - self.draft.upload_errors.push(e.to_string()); + if let Some(files) = rfd::FileDialog::new().pick_files() { + for file in files { + match MediaPath::new(file) { + Ok(media_path) => { + let promise = nostrbuild_nip96_upload( + self.poster.secret_key.secret_bytes(), + media_path, + ); + self.draft.uploading_media.push(promise); + } + Err(e) => { + error!("{e}"); + self.draft.upload_errors.push(e.to_string()); + } } } }