Files
1b04e697f6 All Mail: every conversation outside Spam and the bin, as an opt-in system label (#57)
Archived mail had no list to be browsed in, only search. All Mail lists every conversation outside Spam and the bin (what arrived, what was sent, drafts and archived mail), as Gmail's All Mail does, across the reader's active accounts or within one.

It is LabelRole::AllMail, a view and not a place, like Unread: nothing attaches it to mail, it is created hidden when label settings is opened, it is bound to no account and it refuses moves. Its eye in Settings → Mail → Labels shows or hides both the row beside Drafts and the row at the top of each account's folders. Archiving or snoozing from it leaves the row in place. One list scope, `all_mail`, with the account id as its value or empty for every account; AllMailView holds the rules the row buttons, the bulk toolbar, Move to and select-all ask.

No migration.

Co-authored-by: shady2k <3366415+shady2k@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:36:25 +02:00

26 lines
1.0 KiB
JavaScript

/**
* The list the page is showing, as the server names it: the frame's scope
* (`inbox`, `label`, `all_mail`, …) and the one thing that varies within it
* (the category tab, the label id, the account id).
*
* Sent along with a row's own buttons — archive, snooze, star — so that a
* reply can say whether the row is still in this list. Today only All Mail
* asks (see App\Service\Mail\AllMailView): archived or snoozed, a conversation
* is still in it, where every other list loses it. The toolbar sends the same
* pair from its own values; see list_toolbar_controller.
*
* Read off the live frame at the moment of the click rather than kept, because
* the frame is replaced on every navigation and mail-pane copies the new
* list's values onto it (_copyListContext).
*
* @returns {{scope: string, value: string}}
*/
export function listView() {
const frame = document.getElementById("inbox-list-frame");
return {
scope: frame?.dataset.syncScope ?? "",
value: frame?.dataset.listScopeValue ?? "",
};
}