diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/AccountSectionRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/AccountSectionRecyclerViewAdapter.java index 348eb199..18c98c6f 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/AccountSectionRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/AccountSectionRecyclerViewAdapter.java @@ -2,6 +2,7 @@ package ml.docilealligator.infinityforreddit.adapters.navigationdrawer; import android.content.Intent; import android.content.SharedPreferences; +import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -25,6 +26,7 @@ public class AccountSectionRecyclerViewAdapter extends RecyclerView.Adapter { if (collapseAccountSection) { collapseAccountSection = !collapseAccountSection; - notifyItemRangeInserted(holder.getBindingAdapterPosition() + 1, ACCOUNT_SECTION_ITEMS); + notifyItemRangeInserted(holder.getBindingAdapterPosition() + 1, isLoggedIn ? ACCOUNT_SECTION_ITEMS : ANONYMOUS_ACCOUNT_SECTION_ITEMS); } else { collapseAccountSection = !collapseAccountSection; - notifyItemRangeRemoved(holder.getBindingAdapterPosition() + 1, ACCOUNT_SECTION_ITEMS); + notifyItemRangeRemoved(holder.getBindingAdapterPosition() + 1, isLoggedIn ? ACCOUNT_SECTION_ITEMS : ANONYMOUS_ACCOUNT_SECTION_ITEMS); } notifyItemChanged(holder.getBindingAdapterPosition()); }); @@ -103,7 +105,7 @@ public class AccountSectionRecyclerViewAdapter extends RecyclerView.Adapter 0) { ((MenuItemViewHolder) holder).menuTextView.setText(baseActivity.getString(R.string.inbox_with_count, inboxCount)); @@ -141,10 +143,7 @@ public class AccountSectionRecyclerViewAdapter extends RecyclerView.Adapter