自动更新改为每日检查,user-agent使用默认值
This commit is contained in:
1 parent
5e28481684
commit
567b0a2c19
9 files changed
+254
-225
No files matched your search
@@ -17,6 +17,7 @@ import com.hippo.ehviewer.dialog.DialogBuilder;
|
||||
import com.hippo.ehviewer.network.Downloader;
|
||||
import com.hippo.ehviewer.util.Config;
|
||||
import com.hippo.ehviewer.util.EhClient;
|
||||
import com.hippo.ehviewer.util.Util;
|
||||
import com.hippo.ehviewer.view.AlertButton;
|
||||
|
||||
public class UpdateHelper {
|
||||
@@ -29,10 +30,16 @@ public class UpdateHelper {
|
||||
mActivity = activity;
|
||||
}
|
||||
|
||||
public void autoCheckUpdate() {
|
||||
if (Config.getUpdateDate() < Util.getDate())
|
||||
checkUpdate();
|
||||
}
|
||||
|
||||
public void checkUpdate() {
|
||||
EhClient.checkUpdate(new EhClient.OnCheckUpdateListener() {
|
||||
@Override
|
||||
public void onSuccess(String pageContext) {
|
||||
Config.setUpdateDate();
|
||||
String[] items = pageContext.split("\n");
|
||||
if (items.length > 3) {
|
||||
|
||||
|
||||
Reference in new issue
Block a user