From 8f99661789f6f0fcfb2f9af10167373c14834186 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Sun, 17 Jan 2021 05:02:46 +0100 Subject: [PATCH] thing1 --- .../loggerdisplays/uilogger/UiLoggerController.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/G-Earth/src/main/java/gearth/ui/logger/loggerdisplays/uilogger/UiLoggerController.java b/G-Earth/src/main/java/gearth/ui/logger/loggerdisplays/uilogger/UiLoggerController.java index d8d69b5..1422f47 100644 --- a/G-Earth/src/main/java/gearth/ui/logger/loggerdisplays/uilogger/UiLoggerController.java +++ b/G-Earth/src/main/java/gearth/ui/logger/loggerdisplays/uilogger/UiLoggerController.java @@ -94,8 +94,6 @@ public class UiLoggerController implements Initializable { ArrayList elements = new ArrayList<>(); - String expr = packet.toExpression(isIncoming ? HMessage.Direction.TOCLIENT : HMessage.Direction.TOSERVER); - lblHarbleAPI.setText("Messages: " + (HarbleAPIFetcher.HARBLEAPI == null ? "False" : "True")); if ((viewMessageName || viewMessageHash) && HarbleAPIFetcher.HARBLEAPI != null) { HarbleAPI api = HarbleAPIFetcher.HARBLEAPI; @@ -146,10 +144,13 @@ public class UiLoggerController implements Initializable { } } - String cleaned = cleanTextContent(expr); - if (cleaned.equals(expr)) { - if (!expr.equals("") && displayStructure && packet.length() <= 2000) - elements.add(new Element("\n" + cleanTextContent(expr), "structure")); + if (packet.length() <= 2000) { + String expr = packet.toExpression(isIncoming ? HMessage.Direction.TOCLIENT : HMessage.Direction.TOSERVER); + String cleaned = cleanTextContent(expr); + if (cleaned.equals(expr)) { + if (!expr.equals("") && displayStructure) + elements.add(new Element("\n" + cleanTextContent(expr), "structure")); + } }