Skip to content

Commit

Permalink
Don't display connection loss notification if window is active
Browse files Browse the repository at this point in the history
  • Loading branch information
ztefn committed Dec 21, 2024
1 parent 0edda57 commit 6517d56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/controller.vala
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,8 @@ namespace Haguichi {
}

public static void notify_connection_lost () {
if (notifications.get_boolean ("connection-loss")) {
// Display notification only if preference is set and window is not currently active
if (notifications.get_boolean ("connection-loss") && !(win.visible && win.is_active)) {
Bubble bubble = new Bubble (_("Hamachi Lost Connection"), null);
bubble.add_reconnect_action ();
bubble.show ();
Expand Down

0 comments on commit 6517d56

Please sign in to comment.