mirror of https://github.com/sk22/megalodon.git
don't load new posts every time we hit the top
This commit is contained in:
parent
5db44cbf9d
commit
67cbc8aff2
|
@ -74,9 +74,8 @@ public class HomeTimelineFragment extends StatusListFragment {
|
|||
list.addOnScrollListener(new RecyclerView.OnScrollListener(){
|
||||
@Override
|
||||
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy){
|
||||
if(parent!=null && list.getChildAdapterPosition(list.getChildAt(0))<=getMainAdapterOffset()){
|
||||
if(parent.isNewPostsBtnShown()) parent.hideNewPostsButton();
|
||||
else if(!dataLoading && GlobalUserPreferences.loadNewPosts) loadNewPosts();
|
||||
if(parent!=null && parent.isNewPostsBtnShown() && list.getChildAdapterPosition(list.getChildAt(0))<=getMainAdapterOffset()){
|
||||
parent.hideNewPostsButton();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue