From a09ad5cec016575ef3041367826a1bd1b261a9fc Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Wed, 1 Mar 2023 01:01:44 -0500 Subject: dont notify if message channel is focused --- src/notifications/notifications.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/notifications') diff --git a/src/notifications/notifications.cpp b/src/notifications/notifications.cpp index ed4a879..351cf32 100644 --- a/src/notifications/notifications.cpp +++ b/src/notifications/notifications.cpp @@ -10,6 +10,8 @@ void Notifications::CheckMessage(const Message &message) { auto &discord = Abaddon::Get().GetDiscordClient(); // ignore if the channel is muted if (discord.IsChannelMuted(message.ChannelID)) return; + // ignore if focused and message's channel is active + if (Abaddon::Get().IsMainWindowActive() && Abaddon::Get().GetActiveChannelID() == message.ChannelID) return; // notify messages in DMs const auto channel = discord.GetChannel(message.ChannelID); if (channel->IsDM()) { -- cgit v1.2.3