Skip to content

Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.

Launcher: hide the race-weekend panel when the calendar becomes empty

Enrico Ottavo37469807b58d
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
index 880d15fcc..755eb1334 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
@@ -2493,8 +2493,8 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {
* nothing animates, so the panel costs the GPU nothing between ticks.
*/
private void updateRace() {
- if (raceCalendar.isEmpty()) return;
- RaceWeekend.State s = RaceWeekend.at(raceCalendar, java.time.Instant.now());
+ // an empty calendar (a theme without race_calendar, or a reset) hides a panel the last theme showed
+ RaceWeekend.State s = raceCalendar.isEmpty() ? null : RaceWeekend.at(raceCalendar, java.time.Instant.now());
if (s == null) {
racePanel.setVisibility(View.GONE);
return;