From 8813e6464eb4afd4117def5a0d47fdb3f6acbab1 Mon Sep 17 00:00:00 2001 From: Miguel Fernandes Date: Thu, 20 Apr 2017 22:29:58 +0200 Subject: [PATCH] Fixes #33 --- .../web/js/controllers/topic/topicViewController.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/marble-core/src/main/resources/web/js/controllers/topic/topicViewController.js b/marble-core/src/main/resources/web/js/controllers/topic/topicViewController.js index 029e029..bcce326 100644 --- a/marble-core/src/main/resources/web/js/controllers/topic/topicViewController.js +++ b/marble-core/src/main/resources/web/js/controllers/topic/topicViewController.js @@ -124,10 +124,14 @@ angular.module('marbleCoreApp') }; $scope.rebootExtraction = function () { - $scope.topic.lowerLimit = $scope.topic.upperLimit; - $scope.topic.upperLimit = ""; - $scope.update(); - $scope.extract(); + TopicInfoFactory.show({name: $stateParams.topicName}).$promise.then(function(data) { + if (data.newestPostId) { + $scope.topic.lowerLimit = data.newestPostId; + $scope.topic.upperLimit = ""; + $scope.update(); + $scope.extract(); + } + }); }; $scope.deletePostsByTopic = function () {