Show success toast when a draft is saved

Adds a "Draft saved" success toast notification after successfully
saving a draft. This applies to both save-and-close (handleSaveDraft)
and save-without-closing (saveCurrentDraft) flows. Previously, only
errors were shown, leaving users without feedback on successful saves.

Closes #9926

https://claude.ai/code/session_0115DTKCRzRvkWgMUVcokJvD
This commit is contained in:
Claude
2026-02-22 11:16:04 +00:00
parent 21e53b226d
commit 4d43627649
+6
View File
@@ -605,11 +605,15 @@ export const ComposePost = ({
})
onClose()
setTimeout(() => {
Toast.show(_(msg`Draft saved`), {type: 'success'})
}, 500)
} catch (e) {
logger.error('Failed to save draft', {error: e})
setError(getDraftSaveError(e))
}
}, [
_,
saveDraft,
composerState,
composerDispatch,
@@ -633,12 +637,14 @@ export const ComposePost = ({
existingDraftId: composerState.draftId,
})
composerDispatch({type: 'mark_saved', draftId: result.draftId})
Toast.show(_(msg`Draft saved`), {type: 'success'})
return {success: true}
} catch (e) {
setError(getDraftSaveError(e))
return {success: false}
}
}, [
_,
saveDraft,
composerState,
composerDispatch,