From ca5da7b5cdbc8283aa206895ca7b8732322b8a34 Mon Sep 17 00:00:00 2001 From: Swift Coder Date: Tue, 15 Oct 2024 22:47:21 -0400 Subject: [PATCH] Ensures the order in which they were picked (with numbered badge selection) --- damus/Views/MediaPicker.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/damus/Views/MediaPicker.swift b/damus/Views/MediaPicker.swift index 44336435..e70a2d42 100644 --- a/damus/Views/MediaPicker.swift +++ b/damus/Views/MediaPicker.swift @@ -117,7 +117,7 @@ struct MediaPicker: UIViewControllerRepresentable { var configuration = PHPickerConfiguration(photoLibrary: .shared()) configuration.selectionLimit = 0 // Allows multiple media selection configuration.filter = imagesOnly ? .images : .any(of: [.images, .videos]) - + configuration.selection = .ordered // images are returned in the order they were selected + numbered badge displayed let picker = PHPickerViewController(configuration: configuration) picker.delegate = context.coordinator as any PHPickerViewControllerDelegate return picker