Files
HellionChat/HellionChat/_Helpers/TabSoundDecision.cs
T

18 lines
709 B
C#

namespace HellionChat._Helpers;
// Pure decision helper: should an incoming message play a per-tab notification
// sound? Kept Dalamud-free so the Build Suite can test the
// "inactive + enabled + global-allowed" rule in isolation.
// TEST-MIRROR: ../../../Hellion Build test/Ui/TabSoundDecisionTests.cs
public static class TabSoundDecision
{
// True only when the message landed in a tab the user is not looking at,
// that tab has its own sound switched on, and the global sound master is
// not muted.
public static bool ShouldPlay(
bool isActiveTab,
bool tabSoundEnabled,
bool globalSoundsEnabled
) => !isActiveTab && tabSoundEnabled && globalSoundsEnabled;
}