Make "Move to Inbox" work from Snoozed and custom folders (#90)

Moving a snoozed message to the Inbox only set its status to received, which it already was, and left snoozedUntil alone. The Snoozed list keeps showing messages whose snooze has not run out, and the Inbox hides them, so nothing visible happened. Moving to the Inbox now clears the snooze.

The toolbar also left "Inbox" out of the move menu whenever it did not know the folder, which is always the case in a custom folder, so mail could not be moved back to the Inbox from there. It is only hidden in the Inbox itself now.

Co-authored-by: Can Kirca <9063990+cankirca@users.noreply.github.com>
This commit is contained in:
Can K.andCan Kirca authored and GitHub committed 2026-10-11 02:27:31 +07:00
1 parent c105dedd43
commit f10093dcf5
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -59,6 +59,7 @@ export async function POST(request: Request) {
...(status ? { status } : {}),
...(read !== null ? { read } : {}),
...(folderId !== undefined ? { folderId } : {}),
...(payload.action === "inbox" ? { snoozedUntil: null } : {}),
};
if (payload.action !== "delete" && Object.keys(values).length === 0) {
@@ -38,7 +38,7 @@ export function BulkMessageToolbar({
// Trash and Spam also offer the irreversible delete; the page confirms before running it.
const canDeleteForever = supportsPermanentDelete(folder);
const moveOptions = [
{ value: "inbox", label: t("navigation.inbox"), Icon: Inbox, hidden: !folder || folder === "inbox" },
{ value: "inbox", label: t("navigation.inbox"), Icon: Inbox, hidden: folder === "inbox" },
{ value: "archive", label: t("navigation.archived"), Icon: Archive, hidden: folder === "archived" },
{ value: "spam", label: t("navigation.spam"), Icon: ShieldAlert, hidden: folder === "spam" },
{ value: "trash", label: t("navigation.trash"), Icon: Trash2, hidden: folder === "trash" },