feat: stash composes closed by sidebar trips as drafts

This commit is contained in:
randogoth 2026-10-03 09:44:19 +03:00
parent f55821213d
commit 84650e50bd
5 changed files with 310 additions and 13 deletions

View file

@ -219,6 +219,19 @@ fn plant(dir: &Path) -> Result<(), String> {
// pre-marked read rows, so unread dots have both states to show
std::fs::write(dir.join("read.txt"), read_ids.join("\n") + "\n").map_err(|e| e.to_string())?;
// one sample draft, so the drafts folder has a row to show
crate::ops::save_drafts(
&dir.join("drafts.txt"),
&[crate::ops::Draft {
id: "0000000000000000".into(),
to: "grace@example.org".into(),
subject: "Re: quarterly infrastructure review".into(),
body: "started a reply, will finish it after the review call".into(),
reply_to: None,
at: now() - 3 * 3600,
}],
);
let _ = b32(&pk);
Ok(())
}