swap out cropper library (#8327)

* mostly implement

* type errors

* unused import

* rm comment

* stop accidentally deleting the image while compressing

* upgrade

* type fixes

* upgrade, remove timeout

* bump

* rm mock

* bump

---------

Co-authored-by: Samuel Newman <mozzius@protonmail.com>
This commit is contained in:
hailey
2025-05-06 10:54:08 -07:00
committed by GitHub
parent 973538d246
commit 521ec8e044
23 changed files with 145 additions and 215 deletions
+3 -3
View File
@@ -1,5 +1,4 @@
import {useCallback} from 'react'
import {type Image as RNImage} from 'react-native-image-crop-picker'
import {
type AppBskyActorDefs,
type AppBskyActorGetProfile,
@@ -21,6 +20,7 @@ import {
import {uploadBlob} from '#/lib/api'
import {until} from '#/lib/async/until'
import {useToggleMutationQueue} from '#/lib/hooks/useToggleMutationQueue'
import {type PickerImage} from '#/lib/media/picker.shared'
import {logEvent, type LogEvents, toClout} from '#/lib/statsig/statsig'
import {type Shadow} from '#/state/cache/types'
import {STALE} from '#/state/queries'
@@ -131,8 +131,8 @@ interface ProfileUpdateParams {
| ((
existing: Un$Typed<AppBskyActorProfile.Record>,
) => Un$Typed<AppBskyActorProfile.Record>)
newUserAvatar?: RNImage | undefined | null
newUserBanner?: RNImage | undefined | null
newUserAvatar?: PickerImage | undefined | null
newUserBanner?: PickerImage | undefined | null
checkCommitted?: (res: AppBskyActorGetProfile.Response) => boolean
}
export function useProfileUpdateMutation() {