if account creation is successful, set the refresh to true

This commit is contained in:
alecf%netscape.com 1999-09-15 04:45:20 +00:00
Родитель ccbbd43e99
Коммит 662220abf3
1 изменённых файлов: 10 добавлений и 1 удалений

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

@ -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;
}
}