Open a locked account whole: calendar, contacts and files too
ci / version (pull_request) Skipped
ci / node (pull_request) Successful in 1m7s
ci / publish (pull_request) Skipped
ci / announce (pull_request) Skipped
ci / docker-build (pull_request) Successful in 35s

Switching to a locked account handed to the reader moved only the mail.
Now calendar, contacts and files follow it as well, through a new
viewAccountFor that the three stores use for what they show. Settings,
signatures and push keep ownAccountFor, so nothing of the reader's is
ever written into the locked account (inbuxa AL-7).
This commit is contained in:
jcoffey-dev committed 2026-09-27 18:04:38 -07:00
1 parent 22d891b1ed
commit 173680cc41
6 files changed
+57 -14

No files matched your search

+6 -2
View File
@@ -258,8 +258,8 @@ function AuthedApp() {
}, [accountId]);
/*
* inbuxa AL-7: a delegated account's mail, when it comes into view, and the
* reader's own when it goes back. Push carries nothing for an account only
* inbuxa AL-7: a delegated account, the whole of it, when it comes into
* view, and the reader's own when it goes back. Push carries nothing for an account only
* shared with the reader, so while one is open it is polled.
*/
const viewedOnce = useRef(false);
@@ -271,6 +271,10 @@ function AuthedApp() {
const mail = useMail.getState();
void mail.loadMailboxes();
void mail.loadIdentities();
// The whole account follows: calendar, contacts and files too
void useCalendar.getState().init();
void useContacts.getState().init();
void useFiles.getState().init();
if (!viewing) return;
const poll = window.setInterval(() => {
if (document.visibilityState === "visible") {