diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-11-14 10:41:55 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-14 10:41:55 -0800 |
commit | 0a26e78dcbbf48dad5daae73b210e236d706b22c (patch) | |
tree | c06c737ed49e8294bf5cbec1a75c36b591cb6669 /src/state/models/media/image.ts | |
parent | c687172de96bd6aa85d3aa025c2e0f024640f345 (diff) | |
download | voidsky-0a26e78dcbbf48dad5daae73b210e236d706b22c.tar.zst |
Composer update (react-query refactor) (#1899)
* Move composer state to a context * Rework composer to use RQ --------- Co-authored-by: Eric Bailey <git@esb.lol>
Diffstat (limited to 'src/state/models/media/image.ts')
-rw-r--r-- | src/state/models/media/image.ts | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/state/models/media/image.ts b/src/state/models/media/image.ts index b3796060c..6a226484e 100644 --- a/src/state/models/media/image.ts +++ b/src/state/models/media/image.ts @@ -1,5 +1,4 @@ import {Image as RNImage} from 'react-native-image-crop-picker' -import {RootStoreModel} from 'state/index' import {makeAutoObservable, runInAction} from 'mobx' import {POST_IMG_MAX} from 'lib/constants' import * as ImageManipulator from 'expo-image-manipulator' @@ -42,10 +41,8 @@ export class ImageModel implements Omit<RNImage, 'size'> { } prevAttributes: ImageManipulationAttributes = {} - constructor(public rootStore: RootStoreModel, image: Omit<RNImage, 'size'>) { - makeAutoObservable(this, { - rootStore: false, - }) + constructor(image: Omit<RNImage, 'size'>) { + makeAutoObservable(this) this.path = image.path this.width = image.width @@ -178,7 +175,7 @@ export class ImageModel implements Omit<RNImage, 'size'> { height: this.height, }) - const cropped = await openCropper(this.rootStore, { + const cropped = await openCropper({ mediaType: 'photo', path: this.path, freeStyleCropEnabled: true, |