public void DeleteMailAsync(CharacterMailMessage message, AsyncCompletionDelegate resultDelegate) { StableSession.Instance.DeleteMailAsync(message.MailId, (bool result, string reason) => { if (result) { Messages.Remove(message); } if (resultDelegate != null) resultDelegate(result, reason); if (!result) return; OnMessagesChanged(); OnUnreadCountChanged(); }); }
public void MarkMailReadAsync(CharacterMailMessage message, AsyncCompletionDelegate resultDelegate) { StableSession.Instance.MarkMailReadAsync(message.MailId, (bool result, string reason) => { if (result) { message.ReadDate = DateTime.UtcNow; } if (resultDelegate != null) resultDelegate(result, reason); if (!result) return; OnMessagesChanged(); OnUnreadCountChanged(); }); }