Event details UI improvements.

This commit is contained in:
Burak Kaan Köse
2026-01-01 10:07:56 +01:00
parent e71c050724
commit 3b485dc1fe
14 changed files with 311 additions and 113 deletions
@@ -0,0 +1,32 @@
using CommunityToolkit.Mvvm.Messaging;
using Wino.Core.Domain.Entities.Calendar;
using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Models.Requests;
using Wino.Messaging.Client.Calendar;
namespace Wino.Core.Requests.Calendar;
/// <summary>
/// Request to delete a calendar event on the server.
/// </summary>
public record DeleteCalendarEventRequest(CalendarItem Item) : CalendarRequestBase(Item)
{
public override CalendarSynchronizerOperation Operation => CalendarSynchronizerOperation.DeleteEvent;
/// <summary>
/// After successful deletion, resync to confirm the event was removed.
/// </summary>
public override int ResynchronizationDelay => 2000;
public override void ApplyUIChanges()
{
// Notify UI that the event was deleted
WeakReferenceMessenger.Default.Send(new CalendarItemDeleted(Item));
}
public override void RevertUIChanges()
{
// If deletion fails, we should notify the UI to add it back
WeakReferenceMessenger.Default.Send(new CalendarItemAdded(Item));
}
}