about summary refs log tree commit diff
path: root/src/state
diff options
context:
space:
mode:
Diffstat (limited to 'src/state')
-rw-r--r--src/state/models/user-local-photos.ts8
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
+      })
     })
   }
 }