Avoid further flickering of the subscription buttons
This commit is contained in:
@@ -757,20 +757,19 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
|
||||
$scope.currentPlan = $scope.config.plan;
|
||||
$scope.currency = $scope.config.currency === 'eur' ? '€' : '$';
|
||||
} else {
|
||||
Client.getAppstoreConfig(function (error, result) {
|
||||
Client.getAppstoreConfig(function (error, appstoreConfig) {
|
||||
if (error) return console.error(error);
|
||||
if (!appstoreConfig.token) return;
|
||||
|
||||
if (result.token) {
|
||||
$scope.appstoreConfig = result;
|
||||
AppStore.getProfile(appstoreConfig.token, function (error, result) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
AppStore.getProfile(result.token, function (error, result) {
|
||||
if (error) return console.error(error);
|
||||
// assign late to avoid UI flicketing on update
|
||||
appstoreConfig.profile = result;
|
||||
$scope.appstoreConfig = appstoreConfig;
|
||||
|
||||
$scope.appstoreConfig.profile = result;
|
||||
|
||||
getSubscription();
|
||||
});
|
||||
}
|
||||
getSubscription();
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user