improved settings with sounds bug fix

This commit is contained in:
choco
2025-10-11 00:46:18 +02:00
parent f5339dc1d2
commit e13fde3d43
7 changed files with 325 additions and 172 deletions

View File

@@ -122,38 +122,25 @@ public partial class ApiController
// Fire and forget async operation
_ = Task.Run(async () =>
{
var myCidHash = (await _dalamudUtil.GetCIDAsync().ConfigureAwait(false)).ToString().GetHash256();
try
{
var myCidHash = (await _dalamudUtil.GetCIDAsync().ConfigureAwait(false)).ToString().GetHash256();
try
{
await TryPairWithContentId(request.HashedCid, myCidHash).ConfigureAwait(false);
_pairRequestService.RemoveRequest(request.HashedCid);
Mediator.Publish(new NotificationMessage(
"Pair Request Accepted",
$"Sent a pair request back to {senderName}.",
NotificationType.Info,
TimeSpan.FromSeconds(3)));
}
catch (Exception ex)
{
Mediator.Publish(new NotificationMessage(
"Failed to Accept Pair Request",
ex.Message,
NotificationType.Error,
TimeSpan.FromSeconds(5)));
}
await TryPairWithContentId(request.HashedCid, myCidHash).ConfigureAwait(false);
_pairRequestService.RemoveRequest(request.HashedCid);
}
catch (Exception ex)
{
Mediator.Publish(new NotificationMessage(
"Failed to Accept Pair Request",
ex.Message,
NotificationType.Error,
TimeSpan.FromSeconds(5)));
}
});
},
onDecline: () =>
{
_pairRequestService.RemoveRequest(request.HashedCid);
Mediator.Publish(new NotificationMessage(
"Pair Request Declined",
$"Declined {senderName}'s pair request.",
NotificationType.Info,
TimeSpan.FromSeconds(3)));
});
return Task.CompletedTask;