diff options
author | hailey <me@haileyok.com> | 2025-05-06 10:54:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-06 10:54:08 -0700 |
commit | 521ec8e044e58633530e1864e7abc6e22554d7d3 (patch) | |
tree | e57139a4cfcb9f8859f5e1af008740fc3e8306e3 /src/state/queries | |
parent | 973538d246a3f76550611e438152f1a6cad75f49 (diff) | |
download | voidsky-521ec8e044e58633530e1864e7abc6e22554d7d3.tar.zst |
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>
Diffstat (limited to 'src/state/queries')
-rw-r--r-- | src/state/queries/list.ts | 22 | ||||
-rw-r--r-- | src/state/queries/profile.ts | 6 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/state/queries/list.ts b/src/state/queries/list.ts index 260a0bf2c..38e8cd62d 100644 --- a/src/state/queries/list.ts +++ b/src/state/queries/list.ts @@ -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() diff --git a/src/state/queries/profile.ts b/src/state/queries/profile.ts index 609a62e25..9f40ab7f6 100644 --- a/src/state/queries/profile.ts +++ b/src/state/queries/profile.ts @@ -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() { |