aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2019-08-22 10:06:43 +0000
committerAlex Ning <chineseperson5@gmail.com>2019-08-22 10:06:43 +0000
commit4a3266e68994b55bf1fc40256cd65c3ac831d2e8 (patch)
tree6bddff76f0512a70b815e3f49a41854088e775a4
parenta52f608af91450f7d3aba643f637ae046e7534a1 (diff)
downloadinfinity-for-reddit-4a3266e68994b55bf1fc40256cd65c3ac831d2e8.tar
infinity-for-reddit-4a3266e68994b55bf1fc40256cd65c3ac831d2e8.tar.gz
infinity-for-reddit-4a3266e68994b55bf1fc40256cd65c3ac831d2e8.tar.bz2
infinity-for-reddit-4a3266e68994b55bf1fc40256cd65c3ac831d2e8.tar.lz
infinity-for-reddit-4a3266e68994b55bf1fc40256cd65c3ac831d2e8.tar.xz
infinity-for-reddit-4a3266e68994b55bf1fc40256cd65c3ac831d2e8.tar.zst
infinity-for-reddit-4a3266e68994b55bf1fc40256cd65c3ac831d2e8.zip
Remove Mange Account option in navigation drawer in MainActivity.
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/AccountRecyclerViewAdapter.java27
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/MainActivity.java5
2 files changed, 5 insertions, 27 deletions
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<AccountRecyclerVie
void addAccountSelected();
void anonymousSelected();
void logoutSelected();
- void manageAccountSelected();
}
private List<Account> mAccounts;
@@ -77,28 +76,12 @@ class AccountRecyclerViewAdapter extends RecyclerView.Adapter<AccountRecyclerVie
holder.usernameTextView.setText(R.string.add_account);
holder.itemView.setOnClickListener(view -> 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<AccountRecyclerVie
return 1;
} else {
if(mCurrentAccountName == null) {
- return mAccounts.size() + 2;
+ return mAccounts.size() + 1;
} else {
- return mAccounts.size() + 4;
+ return mAccounts.size() + 3;
}
}
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/MainActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/MainActivity.java
index f19f54b4..86446023 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/MainActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/MainActivity.java
@@ -451,11 +451,6 @@ public class MainActivity extends AppCompatActivity implements SortTypeBottomShe
finish();
}).execute();
}
-
- @Override
- public void manageAccountSelected() {
-
- }
});
accountRecyclerView.setLayoutManager(new LinearLayoutManager(this));