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; color: white;
border-radius: 50%; border-radius: 50%;
padding: 0.7rem; 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 { @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 weeks = result.weeks as AddonCalendarWeek[];
const currentDay = new Date().getDate(); const currentDay = new Date().getDate();
const currentTime = CoreTimeUtils.timestamp(); const currentTime = CoreTimeUtils.timestamp();
let isPast = true;
const preloadedMonth: PreloadedMonth = { const preloadedMonth: PreloadedMonth = {
...month, ...month,
@ -523,8 +522,7 @@ class AddonCalendarMonthSlidesItemsManagerSource extends CoreSwipeSlidesDynamicI
if (preloadedMonth.isCurrentMonth) { if (preloadedMonth.isCurrentMonth) {
day.istoday = day.mday == currentDay; day.istoday = day.mday == currentDay;
day.ispast = isPast && !day.istoday; day.ispast = preloadedMonth.isPastMonth || day.mday < currentDay;
isPast = day.ispast;
if (day.istoday) { if (day.istoday) {
day.eventsFormated?.forEach((event) => { day.eventsFormated?.forEach((event) => {