Fixes fetch more visibility

This commit is contained in:
stom79 2017-12-09 07:51:25 +01:00
parent 4cd3d8bf3c
commit ed92515f29
1 changed files with 4 additions and 2 deletions

View File

@ -25,6 +25,7 @@ import android.support.v4.app.Fragment;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -311,10 +312,11 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
tmpStatuses.add(tmpStatus);
}
}
if (Long.parseLong(tmpStatuses.get((tmpStatuses.size() - 1)).getId()) > Long.parseLong(bookmark)) {
if (Long.parseLong(tmpStatuses.get(tmpStatuses.size()-1).getId()) > Long.parseLong(bookmark)) {
tmpStatuses.get(tmpStatuses.size()-1).setFetchMore(true);
}
this.statuses.addAll(position, tmpStatuses);
statusListAdapter.notifyItemRangeInserted(position, tmpStatuses.size());
lv_status.scrollToPosition(position+tmpStatuses.size());