版主修改历史/详情 对接数据接口,app更新对比改用VersionCode
This commit is contained in:
@ -112,13 +112,10 @@ public class UpdateManager {
|
||||
loadingDialog = DialogUtils.showWaitDialog(mContext, "检查更新中...");
|
||||
}
|
||||
String channel = HaloApp.getInstance().getChannel();
|
||||
RetrofitManager.getInstance(mContext).getApi().getUpdate(PackageUtils.getVersionName(), channel)
|
||||
RetrofitManager.getInstance(mContext).getApi().getUpdate(PackageUtils.getVersionName(), PackageUtils.getVersionCode(), channel)
|
||||
.map(appEntity -> {
|
||||
String md5 = null;
|
||||
|
||||
float version = Float.valueOf(appEntity.getVersion());
|
||||
float currentVersion = Float.valueOf(PackageUtils.getVersionName());
|
||||
if (version > currentVersion) {
|
||||
if (appEntity.getVersionCode() > PackageUtils.getVersionCode()) {
|
||||
// 助手有更新
|
||||
UpdateManager.this.appEntity = appEntity;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user