Fix pagination in lists

This commit is contained in:
Grishka 2023-10-29 09:59:47 +03:00
parent fd3fff6322
commit 6dac05a21d
1 changed files with 2 additions and 0 deletions

View File

@ -177,6 +177,7 @@ public class HomeTimelineFragment extends StatusListFragment implements ToolbarD
public void onSuccess(List<Status> result){ public void onSuccess(List<Status> result){
if(refreshing) if(refreshing)
list.scrollToPosition(0); list.scrollToPosition(0);
maxID=result.isEmpty() ? null : result.get(result.size()-1).id;
onDataLoaded(result, !result.isEmpty()); onDataLoaded(result, !result.isEmpty());
} }
}) })
@ -189,6 +190,7 @@ public class HomeTimelineFragment extends StatusListFragment implements ToolbarD
public void onSuccess(List<Status> result){ public void onSuccess(List<Status> result){
if(refreshing) if(refreshing)
list.scrollToPosition(0); list.scrollToPosition(0);
maxID=result.isEmpty() ? null : result.get(result.size()-1).id;
onDataLoaded(result, !result.isEmpty()); onDataLoaded(result, !result.isEmpty());
} }
}) })