On error, reset the busy flag
this happens when icon is too large, for example
This commit is contained in:
@@ -144,7 +144,9 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
$scope.display.busy = true;
|
||||
$scope.display.error = {};
|
||||
|
||||
function done() {
|
||||
function done(error) {
|
||||
if (error) Client.error(error);
|
||||
|
||||
refreshApp($scope.display.show);
|
||||
|
||||
$timeout(function () {
|
||||
@@ -158,14 +160,14 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
var configureLabel = $scope.display.label === $scope.app.label ? NOOP : Client.configureApp.bind(null, $scope.app.id, 'label', { label: $scope.display.label });
|
||||
|
||||
configureLabel(function (error) {
|
||||
if (error) return Client.error(error);
|
||||
if (error) return done(error);
|
||||
|
||||
var tags = $scope.display.tags.split(',').map(function (t) { return t.trim(); }).filter(function (t) { return !!t; });
|
||||
|
||||
var configureTags = angular.equals(tags, $scope.app.tags) ? NOOP : Client.configureApp.bind(null, $scope.app.id, 'tags', { tags: tags });
|
||||
|
||||
configureTags(function (error) {
|
||||
if (error) return Client.error(error);
|
||||
if (error) return done(error);
|
||||
|
||||
// skip if icon is unchanged
|
||||
if ($scope.display.icon.data === null) return done();
|
||||
@@ -178,7 +180,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
}
|
||||
|
||||
Client.configureApp($scope.app.id, 'icon', { icon: icon }, function (error) {
|
||||
if (error) return Client.error(error);
|
||||
if (error) return done(error);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user