about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-01-17 18:35:48 -0600
committerPaul Frazee <pfrazee@gmail.com>2023-01-17 18:35:48 -0600
commit61682d5846523038d9a28f851d2bd7c16d27a4a9 (patch)
treee105a11c3e22290129bca3127e025f5c01a50cde
parentbccc8a64d06310f91b607f2c0e175c26d42ff1fb (diff)
downloadvoidsky-61682d5846523038d9a28f851d2bd7c16d27a4a9.tar.zst
Add images to the post in the right order
-rw-r--r--src/view/com/composer/PhotoCarouselPicker.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/view/com/composer/PhotoCarouselPicker.tsx b/src/view/com/composer/PhotoCarouselPicker.tsx
index 21e91fc94..64f34a0b7 100644
--- a/src/view/com/composer/PhotoCarouselPicker.tsx
+++ b/src/view/com/composer/PhotoCarouselPicker.tsx
@@ -44,7 +44,7 @@ export const PhotoCarouselPicker = ({
         ...IMAGE_PARAMS,
       })
       const img = await compressIfNeeded(cameraRes, 300000)
-      onSelectPhotos([img.path, ...selectedPhotos])
+      onSelectPhotos([...selectedPhotos, img.path])
     } catch (err: any) {
       // ignore
       store.log.warn('Error using camera', err)
@@ -68,7 +68,7 @@ export const PhotoCarouselPicker = ({
           height,
         })
         const img = await compressIfNeeded(cropperRes, 300000)
-        onSelectPhotos([img.path, ...selectedPhotos])
+        onSelectPhotos([...selectedPhotos, img.path])
       } catch (err: any) {
         // ignore
         store.log.warn('Error selecting photo', err)
@@ -102,7 +102,7 @@ export const PhotoCarouselPicker = ({
         const finalImg = await compressIfNeeded(cropperRes, 300000)
         result.push(finalImg.path)
       }
-      onSelectPhotos([...result, ...selectedPhotos])
+      onSelectPhotos([...selectedPhotos, ...result])
     })
   }, [selectedPhotos, onSelectPhotos])