Already update the ui while checking the mail status

This commit is contained in:
Johannes Zellner
2018-01-23 12:41:52 +01:00
parent 16f43e3eac
commit 7c926cc051

View File

@@ -266,21 +266,19 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
}
}
Client.getMailStatusForDomain($scope.selectedDomain.domain, function (error, mailStatus) {
if (error) {
$scope.refreshBusy = false;
return console.error(error);
}
// amend to selected domain to be available for the UI
$scope.selectedDomain.mailConfig = mailConfig;
$scope.selectedDomain.mailStatus = {};
// we will fetch the status without blocking the ui
Client.getMailStatusForDomain($scope.selectedDomain.domain, function (error, mailStatus) {
$scope.refreshBusy = false;
if (error) return console.error(error);
// amend to selected domain to be available for the UI
$scope.selectedDomain.mailConfig = mailConfig;
$scope.selectedDomain.mailStatus = mailStatus;
console.log($scope.selectedDomain);
showExpectedDnsRecords();
$scope.refreshBusy = false;
});
});
};