hardcode messages for now

This commit is contained in:
sirjonasxx 2020-12-28 00:20:33 +01:00
parent b13cba0cf4
commit d590664583
4 changed files with 1124 additions and 9 deletions

View File

@ -87,6 +87,11 @@
<copy file="target/bin/G-Earth.jar" todir="../Build/Windows_32bit/"/>
<copy file="target/bin/G-Earth.jar" todir="../Build/Windows_64bit/"/>
<copy file="src/main/resources/build/messages.json" todir="../Build/Mac/"/>
<copy file="src/main/resources/build/messages.json" todir="../Build/Linux/"/>
<copy file="src/main/resources/build/messages.json" todir="../Build/Windows_32bit/"/>
<copy file="src/main/resources/build/messages.json" todir="../Build/Windows_64bit/"/>
<copy todir="../Build/Mac/">
<fileset dir="src/main/resources/build/mac" includes="**/*" />
</copy>

View File

@ -78,7 +78,7 @@ public class Main extends Application {
if (!gitv.equals(version)) {
Platform.runLater(() -> {
String body = (String)object.get("body");
boolean isForcedUpdate = body.contains("<F>");
boolean isForcedUpdate = body.contains("(!)");
Alert alert = new Alert(isForcedUpdate ? Alert.AlertType.ERROR : Alert.AlertType.INFORMATION, "G-Earth is outdated!", ButtonType.OK);

View File

@ -118,15 +118,16 @@ public class HarbleAPI {
private void addMessage(HMessage.Direction direction, JSONObject object) {
String name;
try {
name = object.getString("Name");
} catch (Exception e) {
name = null;
}
String hash = object.getString("Hash");
Integer headerId = object.getInt("Id");
String structure;
String hash;
try { name = object.getString("Name"); }
catch (Exception e) { name = null; }
try { hash = object.getString("Hash"); }
catch (Exception e) { hash = null; }
int headerId = object.getInt("Id");
String structure;
try {
structure = object.getString("Structure");
} catch (Exception e) {

File diff suppressed because it is too large Load Diff