Add focus for Roar (#770)

This commit is contained in:
ilyaHlevnoy 2022-12-19 16:13:44 +03:00 committed by GitHub
parent 6bd4ee9f3d
commit 9694ebce0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,9 +48,10 @@ public class RoarMessageListener implements GlobalMessageListener {
try {
ChatRoom activeroom = SparkManager.getChatManager().getChatContainer().getActiveChatRoom();
final int framestate = SparkManager.getChatManager().getChatContainer().getChatFrame().getState();
final boolean frameisactive = SparkManager.getChatManager().getChatContainer().getChatFrame().isActive();
// If the message is for a chat that's currently active and showing, do not popup.
if (activeroom.equals(room) && framestate == Frame.NORMAL) {
if (activeroom.equals(room) && framestate == Frame.NORMAL && frameisactive) {
Log.debug( "Surpressing popup: chat is currently active and showing.");
return;
}