From 171a3ec9dcc9dfaec5c617a7f0ee0357be8463b9 Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Wed, 7 May 2014 19:19:51 +0200 Subject: [PATCH] [WO-321] Show spinner when app is logging in --- src/js/dao/email-dao.js | 6 ++++++ src/tpl/mail-list.html | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/js/dao/email-dao.js b/src/js/dao/email-dao.js index a0342fa..981c26c 100644 --- a/src/js/dao/email-dao.js +++ b/src/js/dao/email-dao.js @@ -25,6 +25,7 @@ define(function(require) { self._account = options.account; self._account.busy = false; self._account.online = false; + self._account.loggingIn = false; // validate email address var emailAddress = self._account.emailAddress; @@ -83,6 +84,8 @@ define(function(require) { EmailDAO.prototype.onConnect = function(options, callback) { var self = this; + self._account.loggingIn = true; + self._imapClient = options.imapClient; self._pgpMailer = options.pgpMailer; @@ -91,6 +94,7 @@ define(function(require) { imapClient: self._imapClient }, function(err) { if (err) { + self._account.loggingIn = false; callback(err); return; } @@ -101,11 +105,13 @@ define(function(require) { function onLogin(err) { if (err) { + self._account.loggingIn = false; callback(err); return; } // set status to online + self._account.loggingIn = false; self._account.online = true; // init folders diff --git a/src/tpl/mail-list.html b/src/tpl/mail-list.html index af34203..45b69a5 100644 --- a/src/tpl/mail-list.html +++ b/src/tpl/mail-list.html @@ -23,7 +23,7 @@ -