Skip to content

Commit

Permalink
fix(rn): pagination bottom return if not forced
Browse files Browse the repository at this point in the history
Signed-off-by: Godefroy Ponsinet <godefroy.ponsinet@outlook.com>
  • Loading branch information
90dy committed Jun 12, 2019
1 parent 31d2f91 commit abe6a5a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/react-native/app/container/stream.js
Expand Up @@ -121,8 +121,10 @@ export class StreamPagination extends Stream {
let bottomIndex = this.queue.length - topIndex - 1
let itemBottom = this.queue[bottomIndex]
let supBottom = cursor > itemBottom[cursorField]
if (supBottom && bottomIndex + 1 !== this.queue.length) {
this.queue.splice(bottomIndex + 1, 0, newValue)
if (supBottom) {
if (bottomIndex + 1 !== this.queue.length || change.force) {
this.queue.splice(bottomIndex + 1, 0, newValue)
}
return
}
}
Expand Down

0 comments on commit abe6a5a

Please sign in to comment.