Something is gonna come out of it this time. I am sure of it

This commit is contained in:
LucasGGamerM 2022-12-25 14:16:50 -03:00
parent c1f9a88ef4
commit 92872edb58
2 changed files with 3 additions and 0 deletions

View File

@ -116,6 +116,7 @@ public class GithubSelfUpdaterImpl extends GithubSelfUpdater{
Call call=MastodonAPIController.getHttpClient().newCall(req);
try(Response resp=call.execute()){
JsonObject obj=JsonParser.parseReader(resp.body().charStream()).getAsJsonObject();
String changelog=obj.get("body").getAsString();
String tag=obj.get("tag_name").getAsString();
Pattern pattern=Pattern.compile("v?(\\d+)\\.(\\d+)\\.(\\d+)\\+fork\\.(\\d+)");
Matcher matcher=pattern.matcher(tag);
@ -151,6 +152,7 @@ public class GithubSelfUpdaterImpl extends GithubSelfUpdater{
UpdateInfo info=new UpdateInfo();
info.size=size;
info.version=version;
info.changelog=changelog;
this.info=info;
getPrefs().edit()

View File

@ -50,6 +50,7 @@ public abstract class GithubSelfUpdater{
}
public static class UpdateInfo{
public String changelog;
public String version;
public long size;
}