Fix openCamera, openCropped, lightbox model, and image model usages (#1908)
This commit is contained in:
parent
7d5e01f433
commit
ab1ce078ec
7 changed files with 11 additions and 34 deletions
|
@ -9,7 +9,6 @@ import {
|
|||
usePhotoLibraryPermission,
|
||||
useCameraPermission,
|
||||
} from 'lib/hooks/usePermissions'
|
||||
import {useStores} from 'state/index'
|
||||
import {colors} from 'lib/styles'
|
||||
import {usePalette} from 'lib/hooks/usePalette'
|
||||
import {isWeb, isAndroid} from 'platform/detection'
|
||||
|
@ -184,7 +183,6 @@ export function EditableUserAvatar({
|
|||
avatar,
|
||||
onSelectNewAvatar,
|
||||
}: EditableUserAvatarProps) {
|
||||
const store = useStores()
|
||||
const pal = usePalette('default')
|
||||
const {_} = useLingui()
|
||||
const {requestCameraAccessIfNeeded} = useCameraPermission()
|
||||
|
@ -224,7 +222,7 @@ export function EditableUserAvatar({
|
|||
}
|
||||
|
||||
onSelectNewAvatar(
|
||||
await openCamera(store, {
|
||||
await openCamera({
|
||||
width: 1000,
|
||||
height: 1000,
|
||||
cropperCircleOverlay: true,
|
||||
|
@ -255,7 +253,7 @@ export function EditableUserAvatar({
|
|||
return
|
||||
}
|
||||
|
||||
const croppedImage = await openCropper(store, {
|
||||
const croppedImage = await openCropper({
|
||||
mediaType: 'photo',
|
||||
cropperCircleOverlay: true,
|
||||
height: item.height,
|
||||
|
@ -289,7 +287,6 @@ export function EditableUserAvatar({
|
|||
onSelectNewAvatar,
|
||||
requestCameraAccessIfNeeded,
|
||||
requestPhotoAccessIfNeeded,
|
||||
store,
|
||||
],
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue