optional action button toggle for pair request (default on)

This commit is contained in:
choco
2025-10-14 15:07:46 +02:00
parent d6a4595bb8
commit cf27a67296
3 changed files with 26 additions and 2 deletions

View File

@@ -118,8 +118,10 @@ public class NotificationService : DisposableMediatorSubscriberBase, IHostedServ
ShowChat(new NotificationMessage("Pair Request Received", $"{senderName} wants to directly pair with you.", NotificationType.PairRequest));
}
// Show Lightless notification if configured
if (location == NotificationLocation.LightlessUi || location == NotificationLocation.ChatAndLightlessUi)
// Show Lightless notification if configured and action buttons are enabled
if ((location == NotificationLocation.LightlessUi || location == NotificationLocation.ChatAndLightlessUi)
&& _configService.Current.UseLightlessNotifications
&& _configService.Current.ShowPairRequestNotificationActions)
{
var notification = new LightlessNotification
{
@@ -139,6 +141,11 @@ public class NotificationService : DisposableMediatorSubscriberBase, IHostedServ
Mediator.Publish(new LightlessNotificationMessage(notification));
}
else if (location != NotificationLocation.Nowhere && location != NotificationLocation.Chat)
{
// Fall back to regular notification without action buttons
HandleNotificationMessage(new NotificationMessage("Pair Request Received", $"{senderName} wants to directly pair with you.", NotificationType.PairRequest));
}
}
private uint? GetPairRequestSoundId() =>