Merge pull request #2450 from dpalou/MOBILE-3466

MOBILE-3466 calendar: Fix today if server has different timezone
main
Juan Leyva 2020-07-14 12:06:54 +02:00 committed by GitHub
commit b43b6d8301
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions

View File

@ -222,7 +222,7 @@ export class AddonCalendarCalendarComponent implements OnInit, OnChanges, DoChec
let isPast = true;
this.weeks.forEach((week) => {
week.days.some((day) => {
week.days.forEach((day) => {
day.istoday = day.mday == currentDay;
day.ispast = isPast && !day.istoday;
isPast = day.ispast;
@ -231,11 +231,7 @@ export class AddonCalendarCalendarComponent implements OnInit, OnChanges, DoChec
day.events.forEach((event) => {
event.ispast = this.isEventPast(event);
});
return true;
}
return day.istoday;
});
});
}