fix: 修复静默检查的严重问题
🚨 关键修复: - 移除多余的 getAutoUpdateCheck() 判断 - 完全恢复 FongMi/TV 的更新检查逻辑 - 所有控制都通过 Setting.getUpdate() 进行 🔄 正确的更新流程: 1. 应用启动时总是执行更新检查 2. 但是否弹窗由 Setting.getUpdate() 控制 3. 用户拒绝更新后不再弹窗,直到手动检查 ⚠️ 问题说明: 之前添加的 getAutoUpdateCheck() 检查是错误的, 这会导致即使有新版本也不弹窗的问题。 FongMi/TV 没有这个额外检查,所有逻辑都在 need() 方法中。
This commit is contained in:
@@ -75,11 +75,6 @@ public class Updater implements Download.Callback {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void start(Activity activity) {
|
public void start(Activity activity) {
|
||||||
// 检查是否启用启动时自动检查更新
|
|
||||||
if (!Setting.getAutoUpdateCheck()) {
|
|
||||||
Logger.d("Auto update check is disabled");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
App.execute(() -> doInBackground(activity));
|
App.execute(() -> doInBackground(activity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ public class Setting {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean getAutoUpdateCheck() {
|
public static boolean getAutoUpdateCheck() {
|
||||||
return Prefers.getBoolean("auto_update_check", true); // 默认启用自动更新检查
|
return Prefers.getBoolean("auto_update_check", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void putAutoUpdateCheck(boolean autoUpdateCheck) {
|
public static void putAutoUpdateCheck(boolean autoUpdateCheck) {
|
||||||
|
|||||||
@@ -75,11 +75,6 @@ public class Updater implements Download.Callback {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void start(Activity activity) {
|
public void start(Activity activity) {
|
||||||
// 检查是否启用启动时自动检查更新
|
|
||||||
if (!Setting.getAutoUpdateCheck()) {
|
|
||||||
Logger.d("Auto update check is disabled");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
App.execute(() -> doInBackground(activity));
|
App.execute(() -> doInBackground(activity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user