mirror of
https://github.com/PrimalHQ/primal-web-app.git
synced 2024-09-29 00:10:50 +00:00
Don't draft reply notes
This commit is contained in:
parent
11c780acf9
commit
2f42a5b7ee
@ -493,7 +493,7 @@ const EditBox: Component<{
|
||||
});
|
||||
|
||||
createEffect(() => {
|
||||
if (props.open) {
|
||||
if (props.open && !props.replyToNote) {
|
||||
const draft = readNoteDraft(account?.publicKey);
|
||||
|
||||
setMessage(draft);
|
||||
@ -525,13 +525,18 @@ const EditBox: Component<{
|
||||
};
|
||||
|
||||
const closeEditor = () => {
|
||||
if (props.replyToNote) {
|
||||
clearEditor();
|
||||
return;
|
||||
}
|
||||
|
||||
if (message().trim().length > 0) {
|
||||
setConfirmEditorClose(true);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
saveNoteDraft(account?.publicKey, '');
|
||||
clearEditor();
|
||||
}
|
||||
|
||||
saveNoteDraft(account?.publicKey, '');
|
||||
clearEditor();
|
||||
};
|
||||
|
||||
const closeEmojiAndMentions = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user