Commit d6f2e71
authored
Fix frozen Yr weather-module (#3706)
Fixes #3296
The problem was that the fetch-methods threw errors when something went
wrong instead of calling `updateAvailable()`. `updateAvailable()` must
be called in order to schedule the next update.
I added some filtering for the hourly forecast that removes hours in the
past. If the API call fails we use the cached data, but we should only
display hours in the future.1 parent af77b7b commit d6f2e71
2 files changed
+23
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
37 | | - | |
| 41 | + | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| |||
119 | 123 | | |
120 | 124 | | |
121 | 125 | | |
122 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
123 | 132 | | |
124 | 133 | | |
125 | 134 | | |
| |||
497 | 506 | | |
498 | 507 | | |
499 | 508 | | |
500 | | - | |
| 509 | + | |
501 | 510 | | |
502 | 511 | | |
503 | 512 | | |
| |||
530 | 539 | | |
531 | 540 | | |
532 | 541 | | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
533 | 548 | | |
| 549 | + | |
| 550 | + | |
534 | 551 | | |
535 | 552 | | |
536 | 553 | | |
| |||
600 | 617 | | |
601 | 618 | | |
602 | 619 | | |
603 | | - | |
| 620 | + | |
604 | 621 | | |
605 | 622 | | |
606 | 623 | | |
0 commit comments