Merge branch 'main' into upload-profile-images
This commit is contained in:
+2
-2
@@ -48,12 +48,12 @@
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSPhotoLibraryUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string></string>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
|
||||
@@ -18,8 +18,8 @@ export class UserLocalPhotosModel {
|
||||
}
|
||||
|
||||
private async _getPhotos() {
|
||||
runInAction(() => {
|
||||
CameraRoll.getPhotos({first: 20}).then(r => {
|
||||
CameraRoll.getPhotos({first: 20}).then(r => {
|
||||
runInAction(() => {
|
||||
this.photos = r.edges
|
||||
})
|
||||
})
|
||||
|
||||
@@ -23,9 +23,14 @@ export const PhotoCarouselPicker = ({
|
||||
cropping: true,
|
||||
width: 1000,
|
||||
height: 1000,
|
||||
}).then(item => {
|
||||
setSelectedPhotos([item.path, ...selectedPhotos])
|
||||
})
|
||||
}).then(
|
||||
item => {
|
||||
setSelectedPhotos([item.path, ...selectedPhotos])
|
||||
},
|
||||
_err => {
|
||||
// ignore
|
||||
},
|
||||
)
|
||||
}, [selectedPhotos, setSelectedPhotos])
|
||||
|
||||
const handleSelectPhoto = useCallback(
|
||||
@@ -58,14 +63,7 @@ export const PhotoCarouselPicker = ({
|
||||
})
|
||||
result.push(img.path)
|
||||
}
|
||||
setSelectedPhotos([
|
||||
// ...items.reduce(
|
||||
// (accum, cur) => accum.concat(cur.sourceURL!),
|
||||
// [] as string[],
|
||||
// ),
|
||||
...result,
|
||||
...selectedPhotos,
|
||||
])
|
||||
setSelectedPhotos([...result, ...selectedPhotos])
|
||||
})
|
||||
}, [selectedPhotos, setSelectedPhotos])
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome'
|
||||
import React, {useCallback} from 'react'
|
||||
import {Alert, StyleSheet, View, TouchableOpacity} from 'react-native'
|
||||
import Svg, {Rect, Defs, LinearGradient, Stop} from 'react-native-svg'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {getGradient} from '../../lib/asset-gen'
|
||||
import {colors} from '../../lib/styles'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user