react-native-activity-feed icon indicating copy to clipboard operation
react-native-activity-feed copied to clipboard

Duplicate posts if tapping on new activity notification while also scrolling and lazy loading feed

Open jwonghl opened this issue 5 years ago • 0 comments

Setup (always fill this in):

  • iOS or Android? Both
  • Expo or regular React Native? regular
  • React Native Version:
  • react-native-activity-feed or expo-activity-feed version: npm list --pattern <package-name>/yarn list --pattern <package-name> 0.8.22
  • getstream version: npm list --pattern getstream/yarn list --pattern getstream 4.5.4

Describe the bug

  1. I have a post(could also be more than one) pinned to the top of the feed because it's rank score is the highest
  2. If a new activity notification occurs, and I am scrolling downwards to load more entries, i receive duplicate posts and clipping of the feed. React Native reports duplicate children in the flatlist.

I suspect it is because of a combination of ranked posts and new entries causing the offset and pagination to work incorrectly.

Removing ranking from the Flatfeed fixes the issue.

To Reproduce Steps to reproduce the behavior:

  1. Scroll through feed quickly
  2. Await for activity notification and tap it then quickly continue scrolling downwards
  3. Scroll upwards until you see the duplicate posts
  4. Clipping also occurs

Expected behavior No duplicate posts

Screenshots 1191652696060579

jwonghl avatar Sep 09 '20 02:09 jwonghl