about summary refs log tree commit diff
path: root/src/state/models/profile-view.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-09-06 14:26:39 -0500
committerPaul Frazee <pfrazee@gmail.com>2022-09-06 14:26:39 -0500
commitbb06ef4f6e7ac7889b3112285d0cf3445b8eb766 (patch)
treee820f23a49c83a3f0aba83b62f4e006307b62504 /src/state/models/profile-view.ts
parent2ec09ba54574f5e05f0bbec9c864dacd2092edd4 (diff)
downloadvoidsky-bb06ef4f6e7ac7889b3112285d0cf3445b8eb766.tar.zst
Rework profile page to include working view selector
Diffstat (limited to 'src/state/models/profile-view.ts')
-rw-r--r--src/state/models/profile-view.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/state/models/profile-view.ts b/src/state/models/profile-view.ts
index b245335f1..89c8a75d0 100644
--- a/src/state/models/profile-view.ts
+++ b/src/state/models/profile-view.ts
@@ -65,7 +65,7 @@ export class ProfileViewModel implements bsky.ProfileView.Response {
   }
 
   async refresh() {
-    await this._load()
+    await this._load(true)
   }
 
   async toggleFollowing() {
@@ -108,8 +108,8 @@ export class ProfileViewModel implements bsky.ProfileView.Response {
   // loader functions
   // =
 
-  private async _load() {
-    this._xLoading()
+  private async _load(isRefreshing = false) {
+    this._xLoading(isRefreshing)
     await new Promise(r => setTimeout(r, 250)) // DEBUG
     try {
       const res = (await this.rootStore.api.mainPds.view(
@@ -119,7 +119,7 @@ export class ProfileViewModel implements bsky.ProfileView.Response {
       this._replaceAll(res)
       this._xIdle()
     } catch (e: any) {
-      this._xIdle(`Failed to load feed: ${e.toString()}`)
+      this._xIdle(e.toString())
     }
   }