mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
if account creation is successful, set the refresh to true
This commit is contained in:
parent
ccbbd43e99
commit
662220abf3
@ -183,12 +183,14 @@ function onFinish() {
|
||||
for (i in wizardContents) {
|
||||
dump("wizardContents[" + i + "] = " + wizardContents[i] + "\n");
|
||||
}
|
||||
createAccount(wizardContents);
|
||||
if (createAccount(wizardContents))
|
||||
window.arguments[0].refresh = true;
|
||||
window.close();
|
||||
}
|
||||
|
||||
function createAccount(hash) {
|
||||
|
||||
try {
|
||||
var mail = Components.classes["component://netscape/messenger/services/session"].getService(Components.interfaces.nsIMsgMailSession);
|
||||
var am = mail.accountManager;
|
||||
|
||||
@ -217,5 +219,12 @@ function createAccount(hash) {
|
||||
account.addIdentity(identity);
|
||||
|
||||
return true;
|
||||
|
||||
} catch (ex) {
|
||||
// return false (meaning we did not create the account)
|
||||
// on any error
|
||||
dump("Error creating account: ex\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user