Fix the computation of the number of remaining entries.

This commit is contained in:
yackob03 2013-10-18 20:19:24 -04:00
parent 4679b0dfcc
commit dc557b9153

View file

@ -373,9 +373,9 @@ function RepoCtrl($scope, Restangular, $routeParams, $rootScope, $location, $tim
$scope.getMoreCount = function(changes) {
if (!changes) { return 0; }
var addedDisplayed = Math.min(15, changes.added.length);
var removedDisplayed = Math.min(15, changes.removed.length);
var changedDisplayed = Math.min(15, changes.changed.length);
var addedDisplayed = Math.min(5, changes.added.length);
var removedDisplayed = Math.min(5, changes.removed.length);
var changedDisplayed = Math.min(5, changes.changed.length);
return (changes.added.length + changes.removed.length + changes.changed.length) -
addedDisplayed - removedDisplayed - changedDisplayed;