aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
index 1f7e621..9ae82e1 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
@@ -69,7 +69,6 @@ public class OneConfigGui extends UScreen {
RenderManager.setupAndDraw((vg) -> {
if (currentPage == null) {
currentPage = new ModsPage();
- currentPage.parents = new ArrayList<>();
currentPage.parents.add(currentPage);
}
if (OneConfigConfig.australia) {
@@ -203,8 +202,8 @@ public class OneConfigGui extends UScreen {
if (page == currentPage) return;
currentPage.finishUpAndClose();
textInputField.setInput("");
- if (page.parents == null) {
- page.parents = new ArrayList<>(currentPage.parents);
+ if (page.parents.size() == 0) {
+ page.parents.addAll(currentPage.parents);
if (!page.isBase()) {
boolean alreadyInParents = false;
for (int i = 0; i < page.parents.size(); i++) {
@@ -221,6 +220,7 @@ public class OneConfigGui extends UScreen {
page.parents.add(page);
}
}
+ sideBar.pageOpened(page.parents.get(0).getTitle());
if (addToPrevious) {
previousPages.add(0, currentPage);
nextPages.clear();