UI visuals for mail calendar items, calendar reminders.

This commit is contained in:
Burak Kaan Köse
2026-02-11 01:49:29 +01:00
parent 870a5e2bf6
commit 52ee5f1d8a
21 changed files with 639 additions and 77 deletions
@@ -4,6 +4,7 @@ using CommunityToolkit.Mvvm.ComponentModel;
using Itenso.TimePeriod;
using Wino.Core.Domain;
using Wino.Core.Domain.Entities.Calendar;
using Wino.Core.Domain.Extensions;
using Wino.Core.Domain.Interfaces;
using Wino.Core.Domain.Models.Calendar;
@@ -32,26 +33,8 @@ public partial class CalendarItemViewModel : ObservableObject, ICalendarItem, IC
}
set
{
// When setting from UI (in local time), convert to event's timezone for storage
if (!string.IsNullOrEmpty(CalendarItem.StartTimeZone))
{
try
{
var sourceTimeZone = TimeZoneInfo.Local;
var targetTimeZone = TimeZoneInfo.FindSystemTimeZoneById(CalendarItem.StartTimeZone);
CalendarItem.StartDate = TimeZoneInfo.ConvertTime(value, sourceTimeZone, targetTimeZone);
}
catch
{
// If timezone lookup fails, set as-is
CalendarItem.StartDate = value;
}
}
else
{
// No timezone info, set as-is
CalendarItem.StartDate = value;
}
// When setting from UI (in local time), convert to event's timezone for storage.
CalendarItem.StartDate = value.ToTimeZoneFromLocal(CalendarItem.StartTimeZone);
}
}