Something is gonna come out of it this time. I am sure of it
This commit is contained in:
parent
c1f9a88ef4
commit
92872edb58
|
@ -116,6 +116,7 @@ public class GithubSelfUpdaterImpl extends GithubSelfUpdater{
|
||||||
Call call=MastodonAPIController.getHttpClient().newCall(req);
|
Call call=MastodonAPIController.getHttpClient().newCall(req);
|
||||||
try(Response resp=call.execute()){
|
try(Response resp=call.execute()){
|
||||||
JsonObject obj=JsonParser.parseReader(resp.body().charStream()).getAsJsonObject();
|
JsonObject obj=JsonParser.parseReader(resp.body().charStream()).getAsJsonObject();
|
||||||
|
String changelog=obj.get("body").getAsString();
|
||||||
String tag=obj.get("tag_name").getAsString();
|
String tag=obj.get("tag_name").getAsString();
|
||||||
Pattern pattern=Pattern.compile("v?(\\d+)\\.(\\d+)\\.(\\d+)\\+fork\\.(\\d+)");
|
Pattern pattern=Pattern.compile("v?(\\d+)\\.(\\d+)\\.(\\d+)\\+fork\\.(\\d+)");
|
||||||
Matcher matcher=pattern.matcher(tag);
|
Matcher matcher=pattern.matcher(tag);
|
||||||
|
@ -151,6 +152,7 @@ public class GithubSelfUpdaterImpl extends GithubSelfUpdater{
|
||||||
UpdateInfo info=new UpdateInfo();
|
UpdateInfo info=new UpdateInfo();
|
||||||
info.size=size;
|
info.size=size;
|
||||||
info.version=version;
|
info.version=version;
|
||||||
|
info.changelog=changelog;
|
||||||
this.info=info;
|
this.info=info;
|
||||||
|
|
||||||
getPrefs().edit()
|
getPrefs().edit()
|
||||||
|
|
|
@ -50,6 +50,7 @@ public abstract class GithubSelfUpdater{
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class UpdateInfo{
|
public static class UpdateInfo{
|
||||||
|
public String changelog;
|
||||||
public String version;
|
public String version;
|
||||||
public long size;
|
public long size;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue