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