diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-03-03 14:02:40 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-03 14:02:40 -0600 |
commit | fd9d6327b455eb47993ca9113da543c66e94c843 (patch) | |
tree | bbd36777db7f198b4bd9602b1634900a2a276820 /src | |
parent | 36b8f011a446261549e4680b9acf15a0ba110a11 (diff) | |
download | voidsky-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')
-rw-r--r-- | src/state/models/profile-view.ts | 4 | ||||
-rw-r--r-- | src/view/com/modals/Modal.tsx | 4 |
2 files changed, 4 insertions, 4 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) diff --git a/src/view/com/modals/Modal.tsx b/src/view/com/modals/Modal.tsx index f939442ba..1346f12f3 100644 --- a/src/view/com/modals/Modal.tsx +++ b/src/view/com/modals/Modal.tsx @@ -15,7 +15,7 @@ import * as DeleteAccountModal from './DeleteAccount' import {usePalette} from 'lib/hooks/usePalette' import {StyleSheet} from 'react-native' -const CLOSED_SNAPPOINTS = ['10%'] +const DEFAULT_SNAPPOINTS = ['90%'] export const ModalsContainer = observer(function ModalsContainer() { const store = useStores() @@ -42,7 +42,7 @@ export const ModalsContainer = observer(function ModalsContainer() { } }, [store.shell.isModalActive, bottomSheetRef, activeModal?.name]) - let snapPoints: (string | number)[] = CLOSED_SNAPPOINTS + let snapPoints: (string | number)[] = DEFAULT_SNAPPOINTS let element if (activeModal?.name === 'confirm') { snapPoints = ConfirmModal.snapPoints |