code cleanup

This commit is contained in:
Synox 2016-07-03 20:02:26 +02:00
parent 2436a256a1
commit 4673331801

View File

@ -7,11 +7,10 @@ class MailboxController {
this.mailboxService = mailboxService;
this.loadingData = true;
this.mails = [];
this.address = null;
this.address = null; // is set when mails are loaded
}
$onInit() {
this.username = this.mailboxService.getCurrentUsername();
this.intervalPromise = this.$interval(() => this.loadMails(), this.config.reload_interval_ms);
this.loadMails();
@ -24,7 +23,7 @@ class MailboxController {
loadMails() {
this.mailboxService.loadEmails(this.username)
this.mailboxService.loadEmails(this.mailboxService.getCurrentUsername())
.then(data => {
this.mails = data.mails;
this.address = this.mailboxService.getCurrentAddress();