From c2daffb999802832d90f08fe338d8952cad1b94c Mon Sep 17 00:00:00 2001 From: buthed010203 Date: Tue, 2 Jan 2024 17:25:12 -0500 Subject: [PATCH 1/3] Fix schematic fetching --- core/src/mindustry/ui/dialogs/SchematicBrowserDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/mindustry/ui/dialogs/SchematicBrowserDialog.java b/core/src/mindustry/ui/dialogs/SchematicBrowserDialog.java index 495983010a..0b17b3513a 100644 --- a/core/src/mindustry/ui/dialogs/SchematicBrowserDialog.java +++ b/core/src/mindustry/ui/dialogs/SchematicBrowserDialog.java @@ -43,7 +43,7 @@ public SchematicBrowserDialog(){ addCloseButton(); buttons.button("@schematic", Icon.copy, this::hideBrowser); buttons.button("@schematic.browser.repo", Icon.host, this.repositoriesDialog::show); - buttons.button("@schematic.browser.fetch", Icon.refresh, () -> fetch(loadedRepositories.keys().toSeq())); + buttons.button("@schematic.browser.fetch", Icon.refresh, () -> fetch(repositoryLinks)); makeButtonOverlay(); getSettings(); From 4e1dad701ed5a194b5733a80959df653e87488b5 Mon Sep 17 00:00:00 2001 From: buthed010203 Date: Tue, 2 Jan 2024 19:27:11 -0500 Subject: [PATCH 2/3] Add debug logs --- core/src/mindustry/ui/dialogs/SchematicBrowserDialog.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/mindustry/ui/dialogs/SchematicBrowserDialog.java b/core/src/mindustry/ui/dialogs/SchematicBrowserDialog.java index 0b17b3513a..d2e9e28b28 100644 --- a/core/src/mindustry/ui/dialogs/SchematicBrowserDialog.java +++ b/core/src/mindustry/ui/dialogs/SchematicBrowserDialog.java @@ -508,6 +508,7 @@ void setup(){ } void rebuild(){ + Time.mark(); repoTable.clear(); repoTable.defaults().pad(5f).left(); for (var i = 0; i < ui.schematicBrowser.repositoryLinks.size; i++) { @@ -546,6 +547,7 @@ void rebuild(){ repoTable.add(table); repoTable.row(); } + Log.info("Rebuilt Schematic Browser in @ms", Time.elapsed()); } void editRepo(String link, Consumer onClose){ From 0e7d694d2e8f21c6dbbe02f98606a97e1c3f5d31 Mon Sep 17 00:00:00 2001 From: buthed010203 Date: Tue, 2 Jan 2024 19:29:49 -0500 Subject: [PATCH 3/3] Add logging to the correct spot --- core/src/mindustry/ui/dialogs/SchematicBrowserDialog.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/ui/dialogs/SchematicBrowserDialog.java b/core/src/mindustry/ui/dialogs/SchematicBrowserDialog.java index d2e9e28b28..bee3e1ae2e 100644 --- a/core/src/mindustry/ui/dialogs/SchematicBrowserDialog.java +++ b/core/src/mindustry/ui/dialogs/SchematicBrowserDialog.java @@ -55,6 +55,7 @@ public SchematicBrowserDialog(){ } void setup(){ + Time.mark(); search = ""; cont.top(); @@ -112,6 +113,7 @@ void setup(){ }; rebuildPane.run(); }).grow().scrollX(false); + Log.info("Rebuilt Schematic Browser in @ms", Time.elapsed()); } void setupRepoUi(Table table, String searchString, String repo){ @@ -508,7 +510,6 @@ void setup(){ } void rebuild(){ - Time.mark(); repoTable.clear(); repoTable.defaults().pad(5f).left(); for (var i = 0; i < ui.schematicBrowser.repositoryLinks.size; i++) { @@ -547,7 +548,6 @@ void rebuild(){ repoTable.add(table); repoTable.row(); } - Log.info("Rebuilt Schematic Browser in @ms", Time.elapsed()); } void editRepo(String link, Consumer onClose){