fix ios image cropping
Bumps @bsky.app/expo-image-crop-tool to 0.5.1, which writes cropped images into the caches directory instead of NSTemporaryDirectory. The old temp dir was not on expo-file-system's scoped-write allowlist, so moveAsync failed with "File '…/tmp/…/..' is not writable" — leaving the composer silently showing the original uncropped image. Also logs non-cancellation crop errors via logger.error so future failures in this path surface instead of silently falling back to the original image. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,7 @@ import {openCropper} from '#/lib/media/picker'
|
||||
import {type PickerImage} from '#/lib/media/picker.shared'
|
||||
import {getDataUriSize} from '#/lib/media/util'
|
||||
import {isCancelledError} from '#/lib/strings/errors'
|
||||
import {logger} from '#/logger'
|
||||
import {IS_NATIVE, IS_WEB} from '#/env'
|
||||
|
||||
export type ImageTransformation = {
|
||||
@@ -149,6 +150,7 @@ export async function cropImage(img: ComposerImage): Promise<ComposerImage> {
|
||||
}
|
||||
} catch (e) {
|
||||
if (!isCancelledError(e)) {
|
||||
logger.error('Failed to crop image', {safeMessage: e})
|
||||
return img
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user