From 62bbabb3f66a73c1e711d4cf664078b131f1781d Mon Sep 17 00:00:00 2001 From: Cameron Wong Date: Thu, 16 Feb 2017 17:56:16 -0500 Subject: [PATCH] According to all known laws of aviation... --- .../acmetensortoys/ctfwstimer/MainActivity.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/mobile/src/main/java/com/acmetensortoys/ctfwstimer/MainActivity.java b/mobile/src/main/java/com/acmetensortoys/ctfwstimer/MainActivity.java index 0a94e21..a713821 100644 --- a/mobile/src/main/java/com/acmetensortoys/ctfwstimer/MainActivity.java +++ b/mobile/src/main/java/com/acmetensortoys/ctfwstimer/MainActivity.java @@ -130,13 +130,18 @@ public class MainActivity extends AppCompatActivity { private boolean egg = false; @SuppressLint({"SetTextI18n"}) public void onclick_gamestate(View v) { - TextView tv = (TextView) v; - if (egg) { - tv.setText(R.string.header_gamestate); - } else { - ((TextView) v).setText("DO NOT TAP ON GLASS"); + final TextView tv = (TextView) v; + // Cam: Because every good easter egg needs to be way over-engineered. + if (!egg) { + egg = true; + tv.setText("DO NOT TAP ON GLASS"); + tv.postDelayed(new Runnable() { + public void run() { + tv.setText(R.string.header_gamestate); + egg = false; + } + }, 3000); } - egg = !egg; } // Kick the mqtt layer on a click on the status stuff -- 2.50.1