This commit is contained in:
stom79 2017-12-06 19:28:48 +01:00
parent e2a5bcf06b
commit 9c4ec82550
2 changed files with 2 additions and 2 deletions

View File

@ -274,7 +274,7 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
}
//Toots are older than the bookmark -> no special treatment with them
if( Long.parseLong(statuses.get(0).getId()) < Long.parseLong(bookmark)){
if( bookmark!= null && Long.parseLong(statuses.get(0).getId()) < Long.parseLong(bookmark)){
this.statuses.addAll(statuses);
statusListAdapter.notifyItemRangeInserted(previousPosition, statuses.size());
}else { //Toots are younger than the bookmark
@ -293,7 +293,7 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
while (loop < this.statuses.size() && Long.parseLong(tmpStatus.getId()) < Long.parseLong(this.statuses.get(loop).getId())) {
loop++;
}
if( Long.parseLong(statuses.get(0).getId()) != Long.parseLong(bookmark) ) {
if(bookmark != null && Long.parseLong(statuses.get(0).getId()) != Long.parseLong(bookmark) ) {
this.statuses.add(loop, tmpStatus);
statusListAdapter.notifyItemInserted(loop);
lastLoop = loop; //Record the last position of the inserted toot in this.statuses