diff options
author | dan <dan.abramov@gmail.com> | 2024-12-10 21:19:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-10 21:19:53 +0000 |
commit | 86155986af742c34e2acc0b3773f442eb7b23af5 (patch) | |
tree | 5d49401a2ceeb51becb3d48251c59e8c21058189 | |
parent | bee50c39541c96c0e3aec47070f738c09e6555c5 (diff) | |
download | voidsky-86155986af742c34e2acc0b3773f442eb7b23af5.tar.zst |
Fix composer shortcut detaching a reply (#7041)
-rw-r--r-- | src/state/shell/composer/index.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/state/shell/composer/index.tsx b/src/state/shell/composer/index.tsx index 9cac64426..7138945f4 100644 --- a/src/state/shell/composer/index.tsx +++ b/src/state/shell/composer/index.tsx @@ -83,7 +83,13 @@ export function Provider({children}: React.PropsWithChildren<{}>) { 'exclamation-circle', ) } else { - setState(opts) + setState(prevOpts => { + if (prevOpts) { + // Never replace an already open composer. + return prevOpts + } + return opts + }) } }) |