I should note that I think that there's a more idiomatic way of doing what I did, but I don't yet fully understand how Weave does things asynchronously.  As such, this commit can probably be refactored to be more in the style of the surrounding code.
This commit is contained in:
Atul Varma 2008-05-23 12:22:08 -07:00
Родитель 6b81299bdb
Коммит 19c389565a
1 изменённых файлов: 7 добавлений и 4 удалений

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

@ -169,11 +169,14 @@ WeaveSvc.prototype = {
},
onWindowOpened: function Weave__onWindowOpened() {
if (!this._startupFinished &&
Utils.prefs.getBoolPref("autoconnect") &&
this.username && this.username != 'nobody@mozilla.com') {
if (!this._startupFinished) {
if (Utils.prefs.getBoolPref("autoconnect") &&
this.username && this.username != 'nobody@mozilla.com') {
// Login, then sync.
let self = this;
this.login(function() { self.sync(); });
}
this._startupFinished = true;
this.login();
}
},