MOBILE-3814 calendar: Fix calendar past events opacity

main
Pau Ferrer Ocaña 2022-03-22 12:21:16 +01:00
parent d446fc2f1c
commit 6e78c1847b
2 changed files with 7 additions and 3 deletions

View File

@ -9,6 +9,12 @@
color: white;
border-radius: 50%;
padding: 0.7rem;
--margin-vertical: 12px;
--margin-end: 12px;
margin-top: var(--margin-vertical);
margin-bottom: var(--margin-vertical);
@include margin-horizontal(null, var(--margin-end));
}
@each $category, $value in $calendar-event-category-colors {

View File

@ -496,7 +496,6 @@ class AddonCalendarMonthSlidesItemsManagerSource extends CoreSwipeSlidesDynamicI
const weeks = result.weeks as AddonCalendarWeek[];
const currentDay = new Date().getDate();
const currentTime = CoreTimeUtils.timestamp();
let isPast = true;
const preloadedMonth: PreloadedMonth = {
...month,
@ -523,8 +522,7 @@ class AddonCalendarMonthSlidesItemsManagerSource extends CoreSwipeSlidesDynamicI
if (preloadedMonth.isCurrentMonth) {
day.istoday = day.mday == currentDay;
day.ispast = isPast && !day.istoday;
isPast = day.ispast;
day.ispast = preloadedMonth.isPastMonth || day.mday < currentDay;
if (day.istoday) {
day.eventsFormated?.forEach((event) => {