about summary refs log tree commit diff
path: root/src/state/models/content/profile.ts
diff options
context:
space:
mode:
authorOllie Hsieh <renahlee@outlook.com>2023-04-17 15:41:44 -0700
committerGitHub <noreply@github.com>2023-04-17 15:41:44 -0700
commit2509290fdd2b20c76c302d4962216f5d2d2b5a73 (patch)
tree455bdd7420556e80242ad245ba8d9907ec6c84ee /src/state/models/content/profile.ts
parent91fadadb5848404bc47b69879bbc38a9011a0c62 (diff)
downloadvoidsky-2509290fdd2b20c76c302d4962216f5d2d2b5a73.tar.zst
Split image cropping into secondary step (#473)
* Split image cropping into secondary step

* Use ImageModel and GalleryModel

* Add fix for pasting image URLs

* Move models to state folder

* Fix things that broke after rebase

* Latest -- has image display bug

* Remove contentFit

* Fix iOS display in gallery

* Tuneup the api signatures and implement compress/resize on web

* Fix await

* Lint fix and remove unused function

* Fix android image pathing

* Fix external embed x button on android

* Remove min-height from composer (no longer useful and was mispositioning the composer on android)

* Fix e2e picker

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to 'src/state/models/content/profile.ts')
-rw-r--r--src/state/models/content/profile.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/state/models/content/profile.ts b/src/state/models/content/profile.ts
index 45d928c92..c26dc8749 100644
--- a/src/state/models/content/profile.ts
+++ b/src/state/models/content/profile.ts
@@ -1,5 +1,4 @@
 import {makeAutoObservable, runInAction} from 'mobx'
-import {PickedMedia} from 'lib/media/picker'
 import {
   ComAtprotoLabelDefs,
   AppBskyActorGetProfile as GetProfile,
@@ -10,6 +9,7 @@ import {RootStoreModel} from '../root-store'
 import * as apilib from 'lib/api/index'
 import {cleanError} from 'lib/strings/errors'
 import {FollowState} from '../cache/my-follows'
+import {Image as RNImage} from 'react-native-image-crop-picker'
 
 export const ACTOR_TYPE_USER = 'app.bsky.system.actorUser'
 
@@ -122,8 +122,8 @@ export class ProfileModel {
 
   async updateProfile(
     updates: AppBskyActorProfile.Record,
-    newUserAvatar: PickedMedia | undefined | null,
-    newUserBanner: PickedMedia | undefined | null,
+    newUserAvatar: RNImage | undefined | null,
+    newUserBanner: RNImage | undefined | null,
   ) {
     await this.rootStore.agent.upsertProfile(async existing => {
       existing = existing || {}