pair/downloads notif changes + more settings options

This commit is contained in:
choco
2025-10-09 13:56:40 +02:00
parent 0dfa667ed3
commit d295f3e22d
6 changed files with 74 additions and 37 deletions

View File

@@ -92,8 +92,8 @@ public class NotificationService : DisposableMediatorSubscriberBase, IHostedServ
{
Title = "Pair Request Received",
Message = $"{senderName} wants to pair with you.",
Type = NotificationType.Info,
Duration = TimeSpan.FromSeconds(60),
Type = NotificationType.PairRequest,
Duration = TimeSpan.FromSeconds(180),
SoundEffectId = NotificationSounds.PairRequest,
Actions = new List<LightlessNotificationAction>
{
@@ -271,7 +271,7 @@ public class NotificationService : DisposableMediatorSubscriberBase, IHostedServ
Id = "pair_download_progress",
Title = "Downloading Pair Data",
Message = message,
Type = NotificationType.Info,
Type = NotificationType.Download,
Duration = TimeSpan.FromMinutes(5),
ShowProgress = true,
Progress = totalProgress
@@ -336,20 +336,24 @@ public class NotificationService : DisposableMediatorSubscriberBase, IHostedServ
if (!_dalamudUtilService.IsLoggedIn) return;
// Get notification location based on type and system pref
// Get notification location based on type and system preference
var location = _configService.Current.UseLightlessNotifications
? msg.Type switch
{
NotificationType.Info => _configService.Current.LightlessInfoNotification,
NotificationType.Warning => _configService.Current.LightlessWarningNotification,
NotificationType.Error => _configService.Current.LightlessErrorNotification,
_ => NotificationLocation.LightlessUI
NotificationType.PairRequest => _configService.Current.LightlessPairRequestNotification,
NotificationType.Download => _configService.Current.LightlessDownloadNotification,
_ => NotificationLocation.LightlessUi
}
: msg.Type switch
{
NotificationType.Info => _configService.Current.InfoNotification,
NotificationType.Warning => _configService.Current.WarningNotification,
NotificationType.Error => _configService.Current.ErrorNotification,
NotificationType.PairRequest => NotificationLocation.Toast,
NotificationType.Download => NotificationLocation.Toast,
_ => NotificationLocation.Nowhere
};
@@ -373,11 +377,11 @@ public class NotificationService : DisposableMediatorSubscriberBase, IHostedServ
ShowChat(msg);
break;
case NotificationLocation.LightlessUI:
case NotificationLocation.LightlessUi:
ShowLightlessNotification(msg);
break;
case NotificationLocation.ChatAndLightlessUI:
case NotificationLocation.ChatAndLightlessUi:
ShowChat(msg);
ShowLightlessNotification(msg);
break;
@@ -419,7 +423,6 @@ public class NotificationService : DisposableMediatorSubscriberBase, IHostedServ
{
NotificationType.Error => Dalamud.Interface.ImGuiNotification.NotificationType.Error,
NotificationType.Warning => Dalamud.Interface.ImGuiNotification.NotificationType.Warning,
NotificationType.Info => Dalamud.Interface.ImGuiNotification.NotificationType.Info,
_ => Dalamud.Interface.ImGuiNotification.NotificationType.Info
};