Small fixes for nsfw

This commit is contained in:
stom79 2018-12-28 12:09:06 +01:00
parent 0e396655c6
commit 2ea75860a6
1 changed files with 13 additions and 3 deletions

View File

@ -794,10 +794,20 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
for (int i = statuses.size() - 1; i >= 0; i--) {
if( this.statuses != null) {
if( type != RetrieveFeedsAsyncTask.Type.HOME){
if( Long.parseLong(statuses.get(i).getId()) > Long.parseLong(this.statuses.get(0).getId())) {
if( tagTimeline == null || !tagTimeline.isART() || (tagTimeline.isART() && tagTimeline.isNSFW())) {
if (Long.parseLong(statuses.get(i).getId()) > Long.parseLong(this.statuses.get(0).getId())) {
inserted++;
this.statuses.add(0, statuses.get(i));
}
}else{
ArrayList<Status> safeStatuses = new ArrayList<>();
for(Status status: statuses){
if( !status.isSensitive())
safeStatuses.add(status);
}
this.statuses.addAll(safeStatuses);
statusListAdapter.notifyItemRangeInserted(0, safeStatuses.size());
}
}else {
if( lastReadToot != null && Long.parseLong(statuses.get(i).getId()) > Long.parseLong(lastReadToot)) {
statuses.get(i).setNew(true);