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>2023-03-03 14:02:40 -0600
committerGitHub <noreply@github.com>2023-03-03 14:02:40 -0600
commitfd9d6327b455eb47993ca9113da543c66e94c843 (patch)
treebbd36777db7f198b4bd9602b1634900a2a276820 /src/state/models/profile-view.ts
parent36b8f011a446261549e4680b9acf15a0ba110a11 (diff)
downloadvoidsky-fd9d6327b455eb47993ca9113da543c66e94c843.tar.zst
Edit profile fixes (#258)
* Fix: only clear banner or avi when requested in edit profile

* Set the default snap points to 90% to ensure the modal never fails to raise
Diffstat (limited to 'src/state/models/profile-view.ts')
-rw-r--r--src/state/models/profile-view.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/state/models/profile-view.ts b/src/state/models/profile-view.ts
index a6854801c..9d3eeff58 100644
--- a/src/state/models/profile-view.ts
+++ b/src/state/models/profile-view.ts
@@ -146,7 +146,7 @@ export class ProfileViewModel {
         cid: res.data.cid,
         mimeType: newUserAvatar.mime,
       }
-    } else {
+    } else if (newUserAvatar === null) {
       updates.avatar = null
     }
     if (newUserBanner) {
@@ -159,7 +159,7 @@ export class ProfileViewModel {
         cid: res.data.cid,
         mimeType: newUserBanner.mime,
       }
-    } else {
+    } else if (newUserBanner === null) {
       updates.banner = null
     }
     await this.rootStore.api.app.bsky.actor.updateProfile(updates)