Do not show error and empty appstore details if not yet setup
This commit is contained in:
@@ -12,6 +12,7 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
$scope.installedApps = Client.getInstalledApps();
|
||||
|
||||
$scope.subscription = null;
|
||||
$scope.subscriptionBusy = true;
|
||||
|
||||
$scope.prettyProviderName = function (provider) {
|
||||
switch (provider) {
|
||||
@@ -307,7 +308,12 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
}
|
||||
|
||||
function getSubscription() {
|
||||
$scope.subscriptionBusy = true;
|
||||
|
||||
Client.getSubscription(function (error, result) {
|
||||
$scope.subscriptionBusy = false;
|
||||
|
||||
if (error && error.statusCode === 412) return; // not yet registered
|
||||
if (error) return console.error(error);
|
||||
if (!$scope.$parent) return; // user changed view. otherwise we get an error that $scope.$parent is null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user