public void SetNotifyMail(C2G.NotifyMailGetAck info) { info.mail_info = info.mail_info.OrderByDescending(mail => mail.mail_idx).ToList(); foreach (var detail_info in info.mail_info) { int index = Mails.FindIndex(mail => mail.MailIdx == detail_info.mail_idx); if (index >= 0) { Mails[index].Detail = detail_info; Mails[index].Data.is_read = false; } else { Mails.Add(new Mail(detail_info)); } } }
void NotifyMailPacketHandler(C2G.NotifyMailGet send, C2G.NotifyMailGetAck recv) { MailManager.Instance.SetNotifyMail(recv); RecursiveNotifyMailChecker(); }