diff options
Diffstat (limited to 'client/components/lists/listBody.js')
-rw-r--r-- | client/components/lists/listBody.js | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index b0974705..88f88db0 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -189,7 +189,8 @@ BlazeComponent.extendComponent({ !this.reachedWipLimit() && Meteor.user() && Meteor.user().isBoardMember() && - !Meteor.user().isCommentOnly() + !Meteor.user().isCommentOnly() && + !Meteor.user().isWorker() ); }, @@ -410,7 +411,7 @@ BlazeComponent.extendComponent({ type: 'board', }, { - sort: ['title'], + sort: { sort: 1 /* boards default sorting */ }, }, ); return boards; @@ -596,7 +597,7 @@ BlazeComponent.extendComponent({ type: 'board', }, { - sort: ['title'], + sort: { sort: 1 /* boards default sorting */ }, }, ); return boards; @@ -742,9 +743,25 @@ BlazeComponent.extendComponent({ }, updateList() { + // Use fallback when requestIdleCallback is not available on iOS and Safari + // https://www.afasterweb.com/2017/11/20/utilizing-idle-moments/ + checkIdleTime = + window.requestIdleCallback || + function(handler) { + const startTime = Date.now(); + return setTimeout(function() { + handler({ + didTimeout: false, + timeRemaining() { + return Math.max(0, 50.0 - (Date.now() - startTime)); + }, + }); + }, 1); + }; + if (this.spinnerInView()) { this.cardlimit.set(this.cardlimit.get() + InfiniteScrollIter); - window.requestIdleCallback(() => this.updateList()); + checkIdleTime(() => this.updateList()); } }, |