question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Load earlier messages by pull

See original GitHub issue

Issue Description

Now there’s a way to add load earlier button at the top of the messages list, or refresh list by passing onRefresh and refreshing props to FlatList via listViewProps. In the second case refresh will be done on pulling list from the bottom to the top.

Is there a way to keep inverted FlatList, but load earlier messages by scroll to the earliest message loaded (at the very top of the list) and pull the list from the top to bottom and control list scroll to keep current earliest element at the place when earlier messages will be loaded?

Additional Information

  • Nodejs version: 10.10.0
  • React version: 16.6.1
  • React Native version: 0.57.5
  • react-native-gifted-chat version: 0.6.0
  • Platform(s) (iOS, Android, or both?): both

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

44reactions
hubermatcommented, Jul 5, 2019

onEndReachedThreshold is a value between 0 and 1.

This works for me perfectly:

listViewProps={
  {
    onEndReached: this.onLoadEarlier.bind(this),
    onEndReachedThreshold: 0.5,
  }
}
1reaction
TheYoungBosscommented, Jul 2, 2019

This issue is very necessary. No any update?

indeed I’m facing to the same problem. Any idea ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Find (and Scroll to) Old Messages on Your iPhone
Go to the Messages app. Find the Search bar on the main screen with all the conversation threads. You may need to drag...
Read more >
Having Trouble Loading Earlier Messages in React-native ...
I have been working on a chat app using Gifted-Chat and a Firebase RealTime database (and running it with Expo). At this point,...
Read more >
Load Earlier Messages button in the Messages app - AppleVis
Thank you for your email. Older messages should be loaded automatically as you scroll through the message history. There is a setting which ......
Read more >
How to Quickly Find Old Text Messages on iPhone ... - iMobie
Search Old Texts in Messages App ... 1. Open the Messages app and enter All Messages > Swipe down with your finger to...
Read more >
How to Find Old Messages on iPhone Without Scrolling
Step 1- Launch the Messages App · Step 2 – Search by Word · Step 3 – Check Your Older Messages.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found