版主历史版本增加初始内容(未修改),修改app更新逻辑

This commit is contained in:
kehaoyuan
2018-12-26 14:25:56 +08:00
parent 7bf2ef1007
commit 13fc6b8453
6 changed files with 53 additions and 11 deletions

View File

@ -120,7 +120,7 @@ public class UpdateManager {
UpdateManager.this.appEntity = appEntity;
// 手动更新 强制更新 每次都提示
if (!isAutoCheck || appEntity.isForce() || "EVERY_TIME_OPEN".equals(appEntity.getAlert())) {
if (!isAutoCheck || "EVERY_TIME_OPEN".equals(appEntity.getAlert())) {
md5 = MD5Utils.getUpdateMD5(appEntity.getUrl(), appEntity.getContent());
} else if (!"NEVER".equals(appEntity.getAlert())) { // 一天提示一次
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(mContext);
@ -170,7 +170,7 @@ public class UpdateManager {
if (handler != null) {
handler.sendEmptyMessage(1);
}
if (e != null && e.code() == 304) {
if (e != null && (e.code() == 304 || e.code() == 404)) {
Utils.toast(mContext, "您的光环助手已是最新版本");
return;
}