diff options
author | Eric Bailey <git@esb.lol> | 2024-04-09 17:08:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-09 15:08:02 -0700 |
commit | c96bc92042e2d5cb2a28736fd7a9dd2593a7b040 (patch) | |
tree | a3ee36404ff38f446459c3b77187c9ec183f267e /src/view/com/composer/Composer.tsx | |
parent | a49a5a351d2b58631d067c0524c5ebb097a3d5fe (diff) | |
download | voidsky-c96bc92042e2d5cb2a28736fd7a9dd2593a7b040.tar.zst |
Small logic cleanups (#3449)
* Small logic cleanups * Small logic cleanups (#3451) * remove a few things * oops * stop swallowing the error * queue callbacks * oops * log error if caught * no need to be nullable * move isClosing=true up * reset `isClosing` and `closeCallbacks` on close completion and open * run queued callbacks on `open` if there are any pending * rm unnecessary ref and check * ensure order of calls is always correct * call `snapToIndex()` on open * add tester to storybook --------- Co-authored-by: Hailey <me@haileyok.com>
Diffstat (limited to 'src/view/com/composer/Composer.tsx')
-rw-r--r-- | src/view/com/composer/Composer.tsx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx index a3ee97a2e..24f61a2ee 100644 --- a/src/view/com/composer/Composer.tsx +++ b/src/view/com/composer/Composer.tsx @@ -507,9 +507,7 @@ export const ComposePost = observer(function ComposePost({ control={discardPromptControl} title={_(msg`Discard draft?`)} description={_(msg`Are you sure you'd like to discard this draft?`)} - onConfirm={() => { - discardPromptControl.close(onClose) - }} + onConfirm={onClose} confirmButtonCta={_(msg`Discard`)} confirmButtonColor="negative" /> |