Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit dc823d2

Browse files
fixes #906 removed load more from profile challenges
1 parent c3521a1 commit dc823d2

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

app/directives/tc-endless-paginator/tc-endless-paginator.directive.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,12 @@ import angular from 'angular'
1010
template: require('./tc-endless-paginator')(),
1111
scope: {
1212
state: '=',
13-
pageParams: '=',
14-
firstLoadMore: '=?'
13+
pageParams: '='
1514
},
1615
controller: ['$scope', function($scope) {
17-
$scope.firstLoadMore = true
1816
$scope.loadMore = function() {
1917
$scope.pageParams.currentOffset += $scope.pageParams.limit
2018
$scope.pageParams.updated++
21-
$scope.firstLoadMore = false
2219
}
2320
}]
2421
}

app/profile/subtrack/subtrack.controller.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import _ from 'lodash'
2828
vm.subTrackStats = []
2929
vm.loadMore = loadMore
3030
vm.pageName = vm.subTrack
31-
vm.firstLoadMore = true
3231
vm.tabs = ['statistics']
3332

3433
if (vm.track !== 'COPILOT') {
@@ -166,7 +165,7 @@ import _ from 'lodash'
166165

167166
window.onscroll = function() {
168167
if ((window.innerHeight + window.scrollY) >= (document.body.offsetHeight - CONSTANTS.INFINITE_SCROLL_OFFSET)) {
169-
if (vm.pageParams.totalCount > vm.challenges.length && vm.firstLoadMore == false) {
168+
if (vm.pageParams.totalCount > vm.challenges.length) {
170169
vm.loadMore()
171170
}
172171
}

app/topcoder.constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ angular.module('CONSTANTS', []).constant('CONSTANTS', {
4444
'SUBMISSION_TYPE_CONTEST': 'Contest Submission',
4545
'STATUS_ACTIVE' : 'Active',
4646
'STATUS_COMPLETED_WITHOUT_WIN' : 'Completed Without Win',
47-
'CHALLENGES_LOADING_CHUNK' : 12,
47+
'CHALLENGES_LOADING_CHUNK' : 36,
4848
'INFINITE_SCROLL_OFFSET' : '400' // footer is 300px and challenge tile is 400px
4949
})

0 commit comments

Comments
 (0)