about summary refs log tree commit diff
path: root/src/state/models/user-local-photos.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-01-27 15:51:24 -0600
committerPaul Frazee <pfrazee@gmail.com>2023-01-27 15:51:24 -0600
commit7916b26aadb7e003728d9dc653ab8b8deabf4076 (patch)
tree507d24512fd71c67d4fe49af4ae5f8746444cceb /src/state/models/user-local-photos.ts
parent0673129b2018c9db0f7c3fc3e2c3214150efcfb8 (diff)
downloadvoidsky-7916b26aadb7e003728d9dc653ab8b8deabf4076.tar.zst
Break out the web/native image picking code and make some progress on the web version
Diffstat (limited to 'src/state/models/user-local-photos.ts')
-rw-r--r--src/state/models/user-local-photos.ts11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/state/models/user-local-photos.ts b/src/state/models/user-local-photos.ts
index 08b2b3901..b14e8a6a4 100644
--- a/src/state/models/user-local-photos.ts
+++ b/src/state/models/user-local-photos.ts
@@ -16,14 +16,9 @@ export class UserLocalPhotosModel {
   }
 
   async setup() {
-    await this._getPhotos()
-  }
-
-  private async _getPhotos() {
-    CameraRoll.getPhotos({first: 20}).then(r => {
-      runInAction(() => {
-        this.photos = r.edges
-      })
+    const r = await CameraRoll.getPhotos({first: 20})
+    runInAction(() => {
+      this.photos = r.edges
     })
   }
 }