diff --git a/src/index.html b/src/index.html index 7c21750ad..ede949c34 100644 --- a/src/index.html +++ b/src/index.html @@ -104,7 +104,6 @@ diff --git a/src/js/main.js b/src/js/main.js index 08d6cf314..bd71c3345 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -43,10 +43,8 @@ angular.module('Application').controller('MainController', ['$scope', '$route', }); }); - $scope.waitForPlanSelection = function () { - if ($scope.waitingForPlanSelection) return; - - $scope.waitingForPlanSelection = true; + $scope.showSubscriptionModal = function () { + $('#setupSubscriptionModal').modal('show'); function checkPlan() { if (!$scope.waitingForPlanSelection) return; @@ -55,7 +53,7 @@ angular.module('Application').controller('MainController', ['$scope', '$route', if (error) return console.error(error); // check again to give more immediate feedback once a subscription was setup - if (subscription.plan.id === 'free') { + if (subscription.plan.id === 'free' || subscription.plan.id === 'expired') { $timeout(checkPlan, 5000); } else { $scope.waitingForPlanSelection = false; @@ -65,11 +63,9 @@ angular.module('Application').controller('MainController', ['$scope', '$route', }); } - checkPlan(); - }; + $scope.waitingForPlanSelection = true; - $scope.showSubscriptionModal = function () { - $('#setupSubscriptionModal').modal('show'); + checkPlan(); }; function refreshNotifications() {