mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-03-27 12:05:29 +01:00
Remove Mange Account option in navigation drawer in MainActivity.
This commit is contained in:
parent
a52f608af9
commit
4a3266e689
@ -28,7 +28,6 @@ class AccountRecyclerViewAdapter extends RecyclerView.Adapter<AccountRecyclerVie
|
|||||||
void addAccountSelected();
|
void addAccountSelected();
|
||||||
void anonymousSelected();
|
void anonymousSelected();
|
||||||
void logoutSelected();
|
void logoutSelected();
|
||||||
void manageAccountSelected();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<Account> mAccounts;
|
private List<Account> mAccounts;
|
||||||
@ -77,28 +76,12 @@ class AccountRecyclerViewAdapter extends RecyclerView.Adapter<AccountRecyclerVie
|
|||||||
holder.usernameTextView.setText(R.string.add_account);
|
holder.usernameTextView.setText(R.string.add_account);
|
||||||
holder.itemView.setOnClickListener(view -> mItemSelectedListener.addAccountSelected());
|
holder.itemView.setOnClickListener(view -> mItemSelectedListener.addAccountSelected());
|
||||||
} else if(position == mAccounts.size() + 1) {
|
} else if(position == mAccounts.size() + 1) {
|
||||||
if(mCurrentAccountName != null) {
|
|
||||||
holder.profileImageGifImageView.setColorFilter(ContextCompat.getColor(mContext, R.color.primaryTextColor), android.graphics.PorterDuff.Mode.SRC_IN);
|
holder.profileImageGifImageView.setColorFilter(ContextCompat.getColor(mContext, R.color.primaryTextColor), android.graphics.PorterDuff.Mode.SRC_IN);
|
||||||
mGlide.load(R.drawable.ic_outline_public_24px)
|
mGlide.load(R.drawable.ic_outline_public_24px)
|
||||||
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(128, 0)))
|
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(128, 0)))
|
||||||
.into(holder.profileImageGifImageView);
|
.into(holder.profileImageGifImageView);
|
||||||
holder.usernameTextView.setText(R.string.anonymous_account);
|
holder.usernameTextView.setText(R.string.anonymous_account);
|
||||||
holder.itemView.setOnClickListener(view -> mItemSelectedListener.anonymousSelected());
|
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)
|
|
||||||
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(128, 0)))
|
|
||||||
.into(holder.profileImageGifImageView);
|
|
||||||
holder.usernameTextView.setText(R.string.manage_accounts);
|
|
||||||
holder.itemView.setOnClickListener(view -> mItemSelectedListener.manageAccountSelected());
|
|
||||||
} else {
|
} else {
|
||||||
holder.profileImageGifImageView.setColorFilter(ContextCompat.getColor(mContext, R.color.primaryTextColor), android.graphics.PorterDuff.Mode.SRC_IN);
|
holder.profileImageGifImageView.setColorFilter(ContextCompat.getColor(mContext, R.color.primaryTextColor), android.graphics.PorterDuff.Mode.SRC_IN);
|
||||||
mGlide.load(R.drawable.ic_outline_block_24px)
|
mGlide.load(R.drawable.ic_outline_block_24px)
|
||||||
@ -116,9 +99,9 @@ class AccountRecyclerViewAdapter extends RecyclerView.Adapter<AccountRecyclerVie
|
|||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
if(mCurrentAccountName == null) {
|
if(mCurrentAccountName == null) {
|
||||||
return mAccounts.size() + 2;
|
return mAccounts.size() + 1;
|
||||||
} else {
|
} else {
|
||||||
return mAccounts.size() + 4;
|
return mAccounts.size() + 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -451,11 +451,6 @@ public class MainActivity extends AppCompatActivity implements SortTypeBottomShe
|
|||||||
finish();
|
finish();
|
||||||
}).execute();
|
}).execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void manageAccountSelected() {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
accountRecyclerView.setLayoutManager(new LinearLayoutManager(this));
|
accountRecyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user