mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-28 20:08:22 +01:00
Readded instance switcher to navbar for anonymous accounts
This commit is contained in:
parent
0550219d58
commit
0384914c16
@ -24,7 +24,7 @@ public class LemmySectionRecyclerViewAdapter extends RecyclerView.Adapter<Recycl
|
||||
private static final int VIEW_TYPE_MENU_ITEM = 2;
|
||||
private static final int LEMMY_SECTION_ITEMS = 2;
|
||||
|
||||
private static final int LEMMY_SECTION_ANONYMOUS_ITEMS = 1;
|
||||
private static final int LEMMY_SECTION_ANONYMOUS_ITEMS = 2;
|
||||
private final boolean isLoggedIn;
|
||||
|
||||
private BaseActivity baseActivity;
|
||||
@ -93,9 +93,15 @@ public class LemmySectionRecyclerViewAdapter extends RecyclerView.Adapter<Recycl
|
||||
drawableId = R.drawable.ic_baseline_info_24;
|
||||
break;
|
||||
case 2:
|
||||
stringId = R.string.blocks;
|
||||
drawableId = R.drawable.ic_outline_lock_24dp;
|
||||
break;
|
||||
if (isLoggedIn) {
|
||||
stringId = R.string.blocks;
|
||||
drawableId = R.drawable.ic_outline_lock_24dp;
|
||||
break;
|
||||
} else {
|
||||
stringId = R.string.anonymous_account_instance;
|
||||
drawableId = R.drawable.ic_account_circle_24dp;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
((MenuItemViewHolder) holder).menuTextView.setText(stringId);
|
||||
|
Loading…
Reference in New Issue
Block a user