Don't draft reply notes

This commit is contained in:
Bojan Mojsilovic 2024-01-29 20:40:46 +01:00
parent 11c780acf9
commit 2f42a5b7ee

View File

@ -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 = () => {