From abe6a5ab128675da63a05ab13074d60dac7d5796 Mon Sep 17 00:00:00 2001 From: Godefroy Ponsinet Date: Wed, 12 Jun 2019 12:32:38 +0200 Subject: [PATCH] fix(rn): pagination bottom return if not forced Signed-off-by: Godefroy Ponsinet --- client/react-native/app/container/stream.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/react-native/app/container/stream.js b/client/react-native/app/container/stream.js index 8562f186a4..029b2ff101 100644 --- a/client/react-native/app/container/stream.js +++ b/client/react-native/app/container/stream.js @@ -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 } }