mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-29 04:17:12 +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:
|
||||||
stringId = R.string.blocks;
|
if (isLoggedIn) {
|
||||||
drawableId = R.drawable.ic_outline_lock_24dp;
|
stringId = R.string.blocks;
|
||||||
break;
|
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);
|
((MenuItemViewHolder) holder).menuTextView.setText(stringId);
|
||||||
|
Loading…
Reference in New Issue
Block a user