File tree Expand file tree Collapse file tree 3 files changed +6
-80
lines changed
src/main/java/com/airsquared/blobsaver Expand file tree Collapse file tree 3 files changed +6
-80
lines changed Original file line number Diff line number Diff line change 35
35
36
36
public class Main {
37
37
38
- static final Version appVersion = new Version ( "2 .3.1") ;
38
+ static final String appVersion = "v2 .3.1" ;
39
39
static final Preferences appPrefs = Preferences .userRoot ().node ("airsquared/blobsaver/prefs" );
40
40
private static final String appID = "com.airsquared.blobsaver" ;
41
41
static Stage primaryStage ;
Original file line number Diff line number Diff line change @@ -102,20 +102,20 @@ protected Void call() throws Exception {
102
102
e .printStackTrace ();
103
103
return null ;
104
104
}
105
- Version newVersion ;
105
+ String newVersion ;
106
106
String changelog ;
107
107
try {
108
- newVersion = new Version ( new JSONObject (response ).getString ("tag_name" ) );
108
+ newVersion = new JSONObject (response ).getString ("tag_name" );
109
109
changelog = new JSONObject (response ).getString ("body" );
110
110
changelog = changelog .substring (changelog .indexOf ("Changelog" ));
111
111
} catch (JSONException e ) {
112
112
newVersion = appVersion ;
113
113
changelog = "" ;
114
114
}
115
- if (newVersion . compareTo ( appVersion ) < 0 //check if this is >= latest version
116
- && (forceCheck || !appPrefs .get ("Ignore Version" , "" ).equals (newVersion . toString () ))) {
115
+ if (! appVersion . equals ( newVersion ) &&
116
+ (forceCheck || !appPrefs .get ("Ignore Version" , "" ).equals (newVersion ))) {
117
117
final CountDownLatch latch = new CountDownLatch (1 );
118
- final String finalNewVersion = newVersion . toString () ; //so that the lambda works
118
+ final String finalNewVersion = newVersion ; //so that the lambda works
119
119
final String finalChangelog = changelog ;
120
120
Platform .runLater (() -> {
121
121
try {
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments