diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/StatusListAdapter.java b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/StatusListAdapter.java index 34e7b9658..ed9583292 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/StatusListAdapter.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/StatusListAdapter.java @@ -161,14 +161,18 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf @Override public int getItemViewType(int position) { - Status status = statuses.get(position); - SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE); - if(status.getReblog() != null && ! sharedpreferences.getBoolean(Helper.SET_SHOW_BOOSTS, true) ) - return HIDDEN_STATUS; - else if((status.getIn_reply_to_account_id()!= null && !status.getIn_reply_to_account_id().equals("null")) || (status.getIn_reply_to_id() != null && !status.getIn_reply_to_id().equals("null") ) && ! sharedpreferences.getBoolean(Helper.SET_SHOW_REPLIES, true)) - return HIDDEN_STATUS; - else + if( type == RetrieveFeedsAsyncTask.Type.HOME) { + Status status = statuses.get(position); + SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE); + if (status.getReblog() != null && !sharedpreferences.getBoolean(Helper.SET_SHOW_BOOSTS, true)) + return HIDDEN_STATUS; + else if ((status.getIn_reply_to_account_id() != null && !status.getIn_reply_to_account_id().equals("null")) || (status.getIn_reply_to_id() != null && !status.getIn_reply_to_id().equals("null")) && !sharedpreferences.getBoolean(Helper.SET_SHOW_REPLIES, true)) + return HIDDEN_STATUS; + else + return DISPLAYED_STATUS; + }else { return DISPLAYED_STATUS; + } } @Override