From 4a3266e68994b55bf1fc40256cd65c3ac831d2e8 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Thu, 22 Aug 2019 18:06:43 +0800 Subject: Remove Mange Account option in navigation drawer in MainActivity. --- .../AccountRecyclerViewAdapter.java | 27 ++++------------------ .../infinityforreddit/MainActivity.java | 5 ---- 2 files changed, 5 insertions(+), 27 deletions(-) (limited to 'app/src/main/java/ml') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/AccountRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/AccountRecyclerViewAdapter.java index 7aba25a7..373c0849 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/AccountRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/AccountRecyclerViewAdapter.java @@ -28,7 +28,6 @@ class AccountRecyclerViewAdapter extends RecyclerView.Adapter mAccounts; @@ -77,28 +76,12 @@ class AccountRecyclerViewAdapter extends RecyclerView.Adapter mItemSelectedListener.addAccountSelected()); } else if(position == mAccounts.size() + 1) { - if(mCurrentAccountName != null) { - holder.profileImageGifImageView.setColorFilter(ContextCompat.getColor(mContext, R.color.primaryTextColor), android.graphics.PorterDuff.Mode.SRC_IN); - mGlide.load(R.drawable.ic_outline_public_24px) - .apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(128, 0))) - .into(holder.profileImageGifImageView); - holder.usernameTextView.setText(R.string.anonymous_account); - holder.itemView.setOnClickListener(view -> mItemSelectedListener.anonymousSelected()); - } else { - holder.profileImageGifImageView.setColorFilter(ContextCompat.getColor(mContext, R.color.primaryTextColor), android.graphics.PorterDuff.Mode.SRC_IN); - mGlide.load(R.drawable.ic_outline_settings_24px) - .apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(128, 0))) - .into(holder.profileImageGifImageView); - holder.usernameTextView.setText(R.string.manage_accounts); - holder.itemView.setOnClickListener(view -> mItemSelectedListener.manageAccountSelected()); - } - } else if(position == mAccounts.size() + 2) { holder.profileImageGifImageView.setColorFilter(ContextCompat.getColor(mContext, R.color.primaryTextColor), android.graphics.PorterDuff.Mode.SRC_IN); - mGlide.load(R.drawable.ic_outline_settings_24px) + mGlide.load(R.drawable.ic_outline_public_24px) .apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(128, 0))) .into(holder.profileImageGifImageView); - holder.usernameTextView.setText(R.string.manage_accounts); - holder.itemView.setOnClickListener(view -> mItemSelectedListener.manageAccountSelected()); + holder.usernameTextView.setText(R.string.anonymous_account); + holder.itemView.setOnClickListener(view -> mItemSelectedListener.anonymousSelected()); } else { holder.profileImageGifImageView.setColorFilter(ContextCompat.getColor(mContext, R.color.primaryTextColor), android.graphics.PorterDuff.Mode.SRC_IN); mGlide.load(R.drawable.ic_outline_block_24px) @@ -116,9 +99,9 @@ class AccountRecyclerViewAdapter extends RecyclerView.Adapter