Some event selections
This commit is contained in:
@@ -793,25 +793,14 @@ public partial class CalendarPageViewModel : CalendarBaseViewModel,
|
|||||||
|
|
||||||
// If the calendar item is not recurring, we can just return it.
|
// If the calendar item is not recurring, we can just return it.
|
||||||
|
|
||||||
if (calendarItemViewModel.ItemType == CalendarItemType.Timed) return new[] { calendarItemViewModel };
|
if (calendarItemViewModel.ItemType == CalendarItemType.Timed || calendarItemViewModel.ItemType == CalendarItemType.RecurringException) return new[] { calendarItemViewModel };
|
||||||
|
|
||||||
|
return DayRanges
|
||||||
// TODO: Implement below logic.
|
.SelectMany(a => a.CalendarDays)
|
||||||
return default;
|
.Select(b => b.EventsCollection.GetCalendarItem(calendarItemViewModel.Id))
|
||||||
|
.Where(c => c != null)
|
||||||
//if (!calendarItemViewModel.IsRecurringEvent)
|
.Cast<CalendarItemViewModel>()
|
||||||
//{
|
.Distinct();
|
||||||
// return [calendarItemViewModel];
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// return DayRanges
|
|
||||||
// .SelectMany(a => a.CalendarDays)
|
|
||||||
// .Select(b => b.EventsCollection.GetCalendarItem(calendarItemViewModel.Id))
|
|
||||||
// .Where(c => c != null)
|
|
||||||
// .Cast<CalendarItemViewModel>()
|
|
||||||
// .Distinct();
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UnselectCalendarItem(CalendarItemViewModel calendarItemViewModel, CalendarDayModel calendarDay = null)
|
private void UnselectCalendarItem(CalendarItemViewModel calendarItemViewModel, CalendarDayModel calendarDay = null)
|
||||||
@@ -820,6 +809,8 @@ public partial class CalendarPageViewModel : CalendarBaseViewModel,
|
|||||||
|
|
||||||
var itemsToUnselect = GetCalendarItems(calendarItemViewModel, calendarDay);
|
var itemsToUnselect = GetCalendarItems(calendarItemViewModel, calendarDay);
|
||||||
|
|
||||||
|
if (itemsToUnselect == null) return;
|
||||||
|
|
||||||
foreach (var item in itemsToUnselect)
|
foreach (var item in itemsToUnselect)
|
||||||
{
|
{
|
||||||
item.IsSelected = false;
|
item.IsSelected = false;
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ public class CalendarEventCollection
|
|||||||
// Multi-day events go to both.
|
// Multi-day events go to both.
|
||||||
// Anything else goes to regular.
|
// Anything else goes to regular.
|
||||||
|
|
||||||
if (calendarItem.ItemType == Enums.CalendarItemType.AllDay)
|
if (calendarItem.ItemType == Enums.CalendarItemType.AllDay || calendarItem.ItemType == Enums.CalendarItemType.MultiDayAllDay || calendarItem.ItemType == Enums.CalendarItemType.RecurringAllDay)
|
||||||
{
|
{
|
||||||
return [_internalAllDayEvents];
|
return [_internalAllDayEvents];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user