using HaloPixelToolBox.Core.Utilities; namespace HaloPixelToolBox.Core.Models.Notifications; public sealed record MessageNotification(MessageNotificationSource Source, string Sender = "", string Content = "") { public bool HasDetails => Sender.Length > 0 || Content.Length > 0; public string DisplayText { get { var app = MessageNotificationClassifier.GetDisplayName(Source); if (Sender.Length > 0) return $"{app} {Sender}:{(Content.Length > 0 ? Content : "有新消息")}"; return $"{app}:{(Content.Length > 0 ? Content : "有新消息")}"; } } }