diff --git a/src/client/Client.tsx b/src/client/Client.tsx index fde5d63..e96c6e8 100644 --- a/src/client/Client.tsx +++ b/src/client/Client.tsx @@ -106,7 +106,7 @@ export default class Client { ); } this.state.session.emails[e.id] = e; - this._triggerChange(); + this._triggerChange("Email " + e.id); }); }) .catch((x) => { @@ -125,7 +125,7 @@ export default class Client { const mailbox = this.mailbox(accountId, mailboxId); if (mailbox == null) return; mailbox.emailIds = response.ids; - this._triggerChange(); + this._triggerChange("Email list " + mailboxId); }) .catch(() => { console.error("Failed to get email list from mailbox", mailboxId); @@ -165,11 +165,12 @@ export default class Client { }); }); account.mailboxes = mailboxes; - this._triggerChange(); + this._triggerChange("Mailboxes " + accountId); }); } - _triggerChange() { + _triggerChange(msg: string) { + console.log("Client change", msg); this.callbacks.forEach((c) => { c(); }); @@ -192,6 +193,6 @@ export default class Client { emails: {}, }; if (!this.state.session) return; - this._triggerChange(); + this._triggerChange("Session"); } }