Open a locked account whole: calendar, contacts and files too
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:
1 parent
22d891b1ed
commit
173680cc41
6 files changed
+57
-14
No files matched your search
+6
-2
@@ -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") {
|
||||
|
||||
Reference in new issue
Block a user