mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-10 12:47:26 +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 VIEW_TYPE_MENU_ITEM = 2;
|
||||||
private static final int LEMMY_SECTION_ITEMS = 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 final boolean isLoggedIn;
|
||||||
|
|
||||||
private BaseActivity baseActivity;
|
private BaseActivity baseActivity;
|
||||||
@ -93,9 +93,15 @@ public class LemmySectionRecyclerViewAdapter extends RecyclerView.Adapter<Recycl
|
|||||||
drawableId = R.drawable.ic_baseline_info_24;
|
drawableId = R.drawable.ic_baseline_info_24;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
if (isLoggedIn) {
|
||||||
stringId = R.string.blocks;
|
stringId = R.string.blocks;
|
||||||
drawableId = R.drawable.ic_outline_lock_24dp;
|
drawableId = R.drawable.ic_outline_lock_24dp;
|
||||||
break;
|
break;
|
||||||
|
} else {
|
||||||
|
stringId = R.string.anonymous_account_instance;
|
||||||
|
drawableId = R.drawable.ic_account_circle_24dp;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
((MenuItemViewHolder) holder).menuTextView.setText(stringId);
|
((MenuItemViewHolder) holder).menuTextView.setText(stringId);
|
||||||
|
Loading…
Reference in New Issue
Block a user