fixed sport amin achievement tips.
authorTrillGates <williamtrillgates@gmail.com>
Wed, 9 Jun 2021 01:57:43 +0000 (09:57 +0800)
committerTrillGates <williamtrillgates@gmail.com>
Wed, 9 Jun 2021 01:57:43 +0000 (09:57 +0800)
app/src/main/java/com/ic/protocols/protocol_anan.java

index 3646ecc..5c2a452 100644 (file)
@@ -502,6 +502,8 @@ public class protocol_anan {
             if (query != null) {
                 if (query.moveToNext()) {
                     targetStep = query.getInt(0);
+                } else {
+                    targetStep = 0;
                 }
                 query.close();
             } else {
@@ -511,7 +513,7 @@ public class protocol_anan {
         }
         ICLogger.d("target step == > " + targetStep + " current total step == > " + totalStepCount);
         //判断是否达标
-        if (targetStep != 0 && totalStepCount >= targetStep) {
+        if (targetStep != -1 && targetStep != 0 && totalStepCount >= targetStep) {
             SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
             String format = simpleDateFormat.format(new Date());
             String record = SharePreferenceUtil.getPrefString(ds.getContextProxy().context,