upgrade, remove timeout
This commit is contained in:
+1
-1
@@ -142,7 +142,7 @@
|
|||||||
"expo-font": "~13.3.0",
|
"expo-font": "~13.3.0",
|
||||||
"expo-haptics": "~14.1.4",
|
"expo-haptics": "~14.1.4",
|
||||||
"expo-image": "~2.1.6",
|
"expo-image": "~2.1.6",
|
||||||
"expo-image-crop-tool": "^0.1.4",
|
"expo-image-crop-tool": "^0.1.5",
|
||||||
"expo-image-manipulator": "~13.1.5",
|
"expo-image-manipulator": "~13.1.5",
|
||||||
"expo-image-picker": "~16.1.4",
|
"expo-image-picker": "~16.1.4",
|
||||||
"expo-linear-gradient": "~14.1.4",
|
"expo-linear-gradient": "~14.1.4",
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import {
|
|||||||
import {makeProfileLink} from '#/lib/routes/links'
|
import {makeProfileLink} from '#/lib/routes/links'
|
||||||
import {colors} from '#/lib/styles'
|
import {colors} from '#/lib/styles'
|
||||||
import {logger} from '#/logger'
|
import {logger} from '#/logger'
|
||||||
import {isAndroid, isIOS, isNative, isWeb} from '#/platform/detection'
|
import {isAndroid, isNative, isWeb} from '#/platform/detection'
|
||||||
import {precacheProfile} from '#/state/queries/profile'
|
import {precacheProfile} from '#/state/queries/profile'
|
||||||
import {HighPriorityImage} from '#/view/com/util/images/Image'
|
import {HighPriorityImage} from '#/view/com/util/images/Image'
|
||||||
import {tokens, useTheme} from '#/alf'
|
import {tokens, useTheme} from '#/alf'
|
||||||
@@ -337,17 +337,12 @@ let EditableUserAvatar = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
setTimeout(
|
|
||||||
async () => {
|
|
||||||
const croppedImage = await openCropper({
|
const croppedImage = await openCropper({
|
||||||
imageUri: item.path,
|
imageUri: item.path,
|
||||||
shape: 'circle',
|
shape: 'circle',
|
||||||
aspectRatio: 1,
|
aspectRatio: 1,
|
||||||
})
|
})
|
||||||
onSelectNewAvatar(croppedImage)
|
onSelectNewAvatar(croppedImage)
|
||||||
},
|
|
||||||
isIOS ? 500 : 500,
|
|
||||||
)
|
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
// Don't log errors for cancelling selection to sentry on ios or android
|
// Don't log errors for cancelling selection to sentry on ios or android
|
||||||
if (!String(e).toLowerCase().includes('cancel')) {
|
if (!String(e).toLowerCase().includes('cancel')) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {Pressable, StyleSheet, View} from 'react-native'
|
import {Pressable, StyleSheet, View} from 'react-native'
|
||||||
import {Image} from 'expo-image'
|
import {Image} from 'expo-image'
|
||||||
import {ModerationUI} from '@atproto/api'
|
import {type ModerationUI} from '@atproto/api'
|
||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ import {
|
|||||||
openCamera,
|
openCamera,
|
||||||
openCropper,
|
openCropper,
|
||||||
openPicker,
|
openPicker,
|
||||||
RNImage,
|
type RNImage,
|
||||||
} from '../../../lib/media/picker'
|
} from '../../../lib/media/picker'
|
||||||
|
|
||||||
export function UserBanner({
|
export function UserBanner({
|
||||||
@@ -71,14 +71,12 @@ export function UserBanner({
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
setTimeout(async () => {
|
|
||||||
onSelectNewBanner?.(
|
onSelectNewBanner?.(
|
||||||
await openCropper({
|
await openCropper({
|
||||||
imageUri: items[0].path,
|
imageUri: items[0].path,
|
||||||
aspectRatio: 3 / 1,
|
aspectRatio: 3 / 1,
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
}, 750)
|
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
if (!String(e).includes('Canceled')) {
|
if (!String(e).includes('Canceled')) {
|
||||||
logger.error('Failed to crop banner', {error: e})
|
logger.error('Failed to crop banner', {error: e})
|
||||||
|
|||||||
@@ -11247,10 +11247,10 @@ expo-haptics@~14.1.4:
|
|||||||
resolved "https://registry.yarnpkg.com/expo-haptics/-/expo-haptics-14.1.4.tgz#442f48b1bdf83484d4fcadc653445aaae6049b70"
|
resolved "https://registry.yarnpkg.com/expo-haptics/-/expo-haptics-14.1.4.tgz#442f48b1bdf83484d4fcadc653445aaae6049b70"
|
||||||
integrity sha512-QZdE3NMX74rTuIl82I+n12XGwpDWKb8zfs5EpwsnGi/D/n7O2Jd4tO5ivH+muEG/OCJOMq5aeaVDqqaQOhTkcA==
|
integrity sha512-QZdE3NMX74rTuIl82I+n12XGwpDWKb8zfs5EpwsnGi/D/n7O2Jd4tO5ivH+muEG/OCJOMq5aeaVDqqaQOhTkcA==
|
||||||
|
|
||||||
expo-image-crop-tool@^0.1.4:
|
expo-image-crop-tool@^0.1.5:
|
||||||
version "0.1.4"
|
version "0.1.5"
|
||||||
resolved "https://registry.yarnpkg.com/expo-image-crop-tool/-/expo-image-crop-tool-0.1.4.tgz#bced84f0b1184071cd46a72d32271ab35399b9ec"
|
resolved "https://registry.yarnpkg.com/expo-image-crop-tool/-/expo-image-crop-tool-0.1.5.tgz#4c56e10f9176c5d0822259b63776722e17ba0fbf"
|
||||||
integrity sha512-ow24RdFlJ0zQx1FLLXJuDQtU6gsJUtFCwcwKqdQGH3N7x7B1h6czmXstB5eIiYbqWwTIIChiPkKYC16FltW1Ug==
|
integrity sha512-61Kh3MWAbScAK2bb+ddnVKTC/lisPDB9JqGIlNI/njTYW+dWW9sUa1jAmb/5nHQbZcHyFm/J3XCTjR2dkHf0QA==
|
||||||
|
|
||||||
expo-image-loader@~5.1.0:
|
expo-image-loader@~5.1.0:
|
||||||
version "5.1.0"
|
version "5.1.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user