fix:
update:闹钟界面缓存
This commit is contained in:
2022-09-05 20:22:57 +08:00
parent 6738ce181f
commit 059e0e1fee
11 changed files with 269 additions and 70 deletions

View File

@@ -90,8 +90,13 @@ public class ConnectManager {
long nowTime = System.currentTimeMillis();
long lastTime = mMMKV.decodeLong(key, 0);
long intervalTime = getConnectModeTime(connectMode);
//防止修改了时间一直返回false
if (lastTime > nowTime) {
return true;
}
//防止一分钟内重复请求
return nowTime - lastTime > intervalTime && nowTime - lastTime > ONE_MINUTES_TIME;
boolean refresh = nowTime - lastTime > intervalTime && nowTime - lastTime > ONE_MINUTES_TIME;
return refresh;
}