broadcast bypass toggle gone

This commit is contained in:
choco
2025-10-17 20:07:14 +02:00
parent 47b7ecd521
commit 44177ab7bd

View File

@@ -403,7 +403,7 @@ public class BroadcastService : IHostedService, IMediatorSubscriber
public async void ToggleBroadcast(bool bypassCooldown = false)
public async void ToggleBroadcast()
{
if (!IsLightFinderAvailable)
@@ -419,7 +419,7 @@ public class BroadcastService : IHostedService, IMediatorSubscriber
await RequireConnectionAsync(nameof(ToggleBroadcast), async () =>
{
var cooldown = RemainingCooldown;
if (!bypassCooldown && !_config.Current.BroadcastEnabled && cooldown is { } cd && cd > TimeSpan.Zero)
if (!_config.Current.BroadcastEnabled && cooldown is { } cd && cd > TimeSpan.Zero)
{
_logger.LogWarning("Cooldown active. Must wait {Remaining}s before re-enabling.", cd.TotalSeconds);
_mediator.Publish(new NotificationMessage(
@@ -556,7 +556,7 @@ public class BroadcastService : IHostedService, IMediatorSubscriber
OnClick = (n) =>
{
_logger.LogInformation("Re-enabling broadcast from notification");
ToggleBroadcast(bypassCooldown: true);
ToggleBroadcast();
n.IsDismissed = true;
n.IsAnimatingOut = true;
}