Make unstable apps a normal button

This commit is contained in:
Girish Ramakrishnan
2019-10-22 10:06:32 -07:00
parent 499cb76492
commit 9c418e110f
2 changed files with 10 additions and 20 deletions

View File

@@ -355,25 +355,22 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
$scope.unstableApps = {
busy: false,
success: false,
enabled: false,
submit: function () {
$scope.unstableApps.busy = true;
Client.setUnstableAppsConfig($scope.unstableApps.enabled, function (error) {
$scope.unstableApps.busy = false;
Client.setUnstableAppsConfig(!$scope.unstableApps.enabled, function (error) {
if (error) {
console.error('Unable to change unstable app listing.', error);
Client.error(error);
$scope.unstableApps.busy = false;
return;
}
$scope.unstableApps.success = true;
$timeout(function () {
$scope.unstableApps.success = false;
}, 5000);
$scope.unstableApps.busy = false;
$scope.unstableApps.enabled = !$scope.unstableApps.enabled;
}, 3000);
});
}
};