Show debug log messages on triggering changes
This commit is contained in:
parent
d6b675f7b6
commit
bf1ad0326d
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue