mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-23 06:31:17 +00:00
Version compare
This commit is contained in:
parent
992171e41f
commit
21d8652947
1 changed files with 14 additions and 3 deletions
|
@ -1004,10 +1004,21 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|||
if (name.endsWith(".apk")) {
|
||||
info.download_url = jasset.optString("browser_download_url");
|
||||
Log.i("Latest version=" + info.tag_name);
|
||||
if (BuildConfig.VERSION_NAME.equals(info.tag_name) && !BuildConfig.DEBUG)
|
||||
return null;
|
||||
else
|
||||
if (BuildConfig.DEBUG)
|
||||
return info;
|
||||
try {
|
||||
if (Double.parseDouble(info.tag_name) <
|
||||
Double.parseDouble(BuildConfig.VERSION_NAME))
|
||||
return null;
|
||||
else
|
||||
return info;
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
if (BuildConfig.VERSION_NAME.equals(info.tag_name))
|
||||
return null;
|
||||
else
|
||||
return info;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue