Skip to content

Commit

Permalink
fix: #228
Browse files Browse the repository at this point in the history
  • Loading branch information
lucien144 committed May 12, 2021
1 parent dbc9d50 commit 030f9f4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/components/PullToRefreshList.dart
Expand Up @@ -191,6 +191,12 @@ class _PullToRefreshListState extends State<PullToRefreshList> {
loadData({bool append = false}) async {
setState(() => _isLoading = true);

if (!append) {
// Not using setState on purpose -> we don't want to rebuild the widget tree, it's not needed.
// TODO: See if this affects performance and if we can do it on other places too.
_lastId = null;
}

// If we try to append the data but the last ID
// from where we try to load the posts is same as the ID of
// last item ID loaded previously.
Expand Down

0 comments on commit 030f9f4

Please sign in to comment.