diff options
Diffstat (limited to 'src/state/models')
-rw-r--r-- | src/state/models/user-local-photos.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/state/models/user-local-photos.ts b/src/state/models/user-local-photos.ts index 4e01f1d94..12b95e376 100644 --- a/src/state/models/user-local-photos.ts +++ b/src/state/models/user-local-photos.ts @@ -1,5 +1,5 @@ import {PhotoIdentifier} from './../../../node_modules/@react-native-camera-roll/camera-roll/src/CameraRoll' -import {makeAutoObservable} from 'mobx' +import {makeAutoObservable, runInAction} from 'mobx' import {CameraRoll} from '@react-native-camera-roll/camera-roll' import {RootStoreModel} from './root-store' @@ -18,8 +18,10 @@ export class UserLocalPhotosModel { } private async _getPhotos() { - CameraRoll.getPhotos({first: 20}).then(r => { - this.photos = r.edges + runInAction(() => { + CameraRoll.getPhotos({first: 20}).then(r => { + this.photos = r.edges + }) }) } } |