extended forecast complete

This commit is contained in:
Matt Walsh committed 2026-09-22 15:23:01 -05:00
1 parent b008807849
commit daa550ee06
1 file changed
+13 -8
+13 -8
View File
@@ -20,15 +20,20 @@ class ExtendedForecast extends WeatherDisplay {
}
// set up timings
// this is called on a switch of display modes so it exits early if no change is necessary
setTimings() {
// set timings
if (settings.portrait?.value) {
this.timing.totalScreens = 1;
this.perPage = 6;
} else {
this.timing.totalScreens = 2;
this.perPage = 3;
}
const portrait = !!settings.portrait?.value;
this.perPage = portrait ? 6 : 3;
const totalScreens = portrait ? 1 : 2;
if (this.timing.totalScreens === totalScreens) return;
this.timing.totalScreens = totalScreens;
this.calcNavTiming();
if (this.screenIndex >= totalScreens) this.screenIndex = totalScreens - 1;
}
// on a change of mode only a recalculation of timings is needed
modeChanged() {
this.setTimings();
}
async getData(weatherParameters, refresh) {