1// static/js/emailLibrary/state.js 2// 3// Shared mutable state for the email-library popup. Keeping these on a 4// single exported object lets sibling modules (utils, signatureFold, 5// future render/menu/composer splits) read and write the same values 6// without each one importing 19 `let` bindings â which ES modules 7// don't allow from outside the defining module anyway. 8// 9// Writes look like `state._libOpen = true` everywhere; reads look like 10// `state._libOpen`. The names match the originals so the refactor is a 11// pure rename, not a semantic change. 12 13export const state = { 14 _libOpen: false, 15 _libJustOpened: false, 16 _libEmails: [], 17 _libTotal: 0, 18 _libOffset: 0, 19 _libFolder: 'INBOX', 20 _libFolders: [], 21 _libAccountId: null, // null = backend default account 22 _libAccounts: [], // list of accounts for the chip strip 23 _libPendingExpandUid: null, 24 _libSearch: '', 25 _libFilter: 'all', // all, unread, unanswered 26 _libSort: 'recent', // recent, unread, favorites 27 _libHasAttachments: false, 28 _libLoading: false, 29 _docModule: null, 30 _onEmailClick: null, 31 _libEscHandler: null, 32 _selectMode: false, 33 _selectedUids: new Set(), 34};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.