]> hydra-www.ietfng.org Git - acmetensortoys-ctfws-android/commitdiff
Make tiny chonos count down if we can
authorNathaniel Wesley Filardo <nwfilardo@gmail.com>
Mon, 28 Feb 2022 22:15:57 +0000 (22:15 +0000)
committerNathaniel Wesley Filardo <nwfilardo@gmail.com>
Sat, 5 Mar 2022 17:08:57 +0000 (17:08 +0000)
And if not, change the top text to be more descriptive

mobile/src/main/java/com/acmetensortoys/ctfwstimer/utils/CtFwSDisplayTinyChrono.java

index 1ba3f5067a1d7978c07dadff14eb44c569108bfd..a2b04e9372e933a41a96a075c64c057ef27de597 100644 (file)
@@ -1,6 +1,7 @@
 package com.acmetensortoys.ctfwstimer.utils;
 
 import android.content.res.Resources;
+import android.os.Build;
 import android.os.SystemClock;
 import android.widget.Chronometer;
 
@@ -64,7 +65,10 @@ public class CtFwSDisplayTinyChrono implements CtFwSGameStateManager.Observer {
                 mCh.setFormat(String.format(mRes.getString(R.string.ctfws_chrono_jailbreak),
                                 now.round));
             }
-            mCh.setBase(now.roundStart * 1000 - tbcf);
+            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
+                mCh.setCountDown(true);
+            }
+            mCh.setBase(now.roundEnd * 1000 - tbcf);
             mCh.start();
         });
     }