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:
+11
-11
@@ -1,20 +1,20 @@
|
||||
import {Image as RNImage} from 'react-native-image-crop-picker'
|
||||
import {
|
||||
$Typed,
|
||||
AppBskyGraphDefs,
|
||||
AppBskyGraphGetList,
|
||||
AppBskyGraphList,
|
||||
type $Typed,
|
||||
type AppBskyGraphDefs,
|
||||
type AppBskyGraphGetList,
|
||||
type AppBskyGraphList,
|
||||
AtUri,
|
||||
BskyAgent,
|
||||
ComAtprotoRepoApplyWrites,
|
||||
Facet,
|
||||
Un$Typed,
|
||||
type BskyAgent,
|
||||
type ComAtprotoRepoApplyWrites,
|
||||
type Facet,
|
||||
type Un$Typed,
|
||||
} from '@atproto/api'
|
||||
import {useMutation, useQuery, useQueryClient} from '@tanstack/react-query'
|
||||
import chunk from 'lodash.chunk'
|
||||
|
||||
import {uploadBlob} from '#/lib/api'
|
||||
import {until} from '#/lib/async/until'
|
||||
import {type PickerImage} from '#/lib/media/picker.shared'
|
||||
import {STALE} from '#/state/queries'
|
||||
import {useAgent, useSession} from '../session'
|
||||
import {invalidate as invalidateMyLists} from './my-lists'
|
||||
@@ -47,7 +47,7 @@ export interface ListCreateMutateParams {
|
||||
name: string
|
||||
description: string
|
||||
descriptionFacets: Facet[] | undefined
|
||||
avatar: RNImage | null | undefined
|
||||
avatar: PickerImage | null | undefined
|
||||
}
|
||||
export function useListCreateMutation() {
|
||||
const {currentAccount} = useSession()
|
||||
@@ -115,7 +115,7 @@ export interface ListMetadataMutateParams {
|
||||
name: string
|
||||
description: string
|
||||
descriptionFacets: Facet[] | undefined
|
||||
avatar: RNImage | null | undefined
|
||||
avatar: PickerImage | null | undefined
|
||||
}
|
||||
export function useListMetadataMutation() {
|
||||
const {currentAccount} = useSession()
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user