damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit e599ef1ac932944547dbc1ef0cb0a97a425f7d03
parent 033c69b92eedc67fd2bafb114dbafdaa1e8688ee
Author: Swift Coder <scoder1747@gmail.com>
Date:   Sat, 23 Nov 2024 19:13:40 -0500

Fix duplicate uploads

Reset orderIds and orderMap

Changelog-Fixed: Fix duplicate uploads
Signed-off-by: Swift Coder <scoder1747@gmail.com>

Diffstat:
Mdamus/Views/MediaPicker.swift | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/damus/Views/MediaPicker.swift b/damus/Views/MediaPicker.swift @@ -40,6 +40,10 @@ struct MediaPicker: UIViewControllerRepresentable { self.parent.presentationMode.dismiss() } + // When user dismiss the upload confirmation and re-adds again, reset orderIds and orderMap + orderIds.removeAll() + orderMap.removeAll() + for result in results { let orderId = result.assetIdentifier ?? UUID().uuidString