版主修改历史/详情 对接数据接口,app更新对比改用VersionCode

This commit is contained in:
kehaoyuan
2018-12-10 16:16:20 +08:00
parent f43c9e5d67
commit 1cc572f774
23 changed files with 461 additions and 294 deletions

View File

@ -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;