remove redundant code, fix channel selection index when switching categories

This commit is contained in:
mykola2312 2024-04-23 17:56:23 +03:00
parent 4802550b1b
commit 8b3005bac9

View file

@ -97,6 +97,7 @@ public class MenuPanel extends JPanel {
switch (menuPosition) {
case MENU_CATEGORIES -> {
loadCategories();
channelIndex = 0;
categoryList.setEnabled(true);
channelList.setEnabled(false);
@ -133,11 +134,6 @@ public class MenuPanel extends JPanel {
vsp.setDividerLocation(50);
add(vsp);
String[] items = new String[128];
for (int i = 0; i < 128; i++) {
items[i] = "item" + i;
}
categoryList = new JList<Category>();
categoryList.setFont(getFont());