Bug 662181 - "Deactivate this device" doesn't update UI instantly on slow internet connections. r=rnewman

This commit is contained in:
Philipp von Weitershausen 2011-06-06 20:29:45 +02:00
Родитель 8b4b8044dd
Коммит ca6d3aafc5
1 изменённых файлов: 10 добавлений и 6 удалений

Просмотреть файл

@ -1050,6 +1050,16 @@ WeaveSvc.prototype = {
}))(),
startOver: function() {
Svc.Obs.notify("weave:engine:stop-tracking");
// We want let UI consumers of the following notification know as soon as
// possible, so let's fake for the CLIENT_NOT_CONFIGURED status for now
// by emptying the passphrase (we still need the password).
Service.passphrase = "";
Status.login = LOGIN_FAILED_NO_PASSPHRASE;
this.logout();
Svc.Obs.notify("weave:service:start-over");
// Deletion doesn't make sense if we aren't set up yet!
if (this.clusterURL != "") {
// Clear client-specific data from the server, including disabled engines.
@ -1065,10 +1075,6 @@ WeaveSvc.prototype = {
this._log.debug("Skipping client data removal: no cluster URL.");
}
// Set a username error so the status message shows "set up..."
Status.login = LOGIN_FAILED_NO_USERNAME;
this.logout();
// Reset all engines and clear keys.
this.resetClient();
CollectionKeys.clear();
@ -1085,8 +1091,6 @@ WeaveSvc.prototype = {
Services.logins.findLogins({}, PWDMGR_HOST, "", "").map(function(login) {
Services.logins.removeLogin(login);
});
Svc.Obs.notify("weave:service:start-over");
Svc.Obs.notify("weave:engine:stop-tracking");
},
delayedAutoConnect: function delayedAutoConnect(delay) {