From 9036a9fcc59f034219f2a9247011ef796893b49f Mon Sep 17 00:00:00 2001 From: Reactor Scram Date: Mon, 15 Apr 2024 17:44:23 -0500 Subject: [PATCH] fix(windows-client): remove spurious "Connected to Firezone" notifications (#4603) Closes #4385 ```[tasklist] ### Manual test cases (f2c8f47b3 passed) - [x] Given there is no token on disk, when you start the app, then there is no notification - [x] Given there is a token on disk, when you start the app and it signs in, then there is 1 notification - [x] Given the app is signed out, when you sign in, then there is 1 notification (test this in a sign-out-sign-in cycle) - [x] Given the app is signed in, when you sign out, then there is no notification - [x] Given the app is signed in, when you change Wi-Fi networks, then there is no notification ``` This will work on Linux once the Linux GUI comes up --- rust/gui-client/src-tauri/src/client/gui.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/rust/gui-client/src-tauri/src/client/gui.rs b/rust/gui-client/src-tauri/src/client/gui.rs index 843063e62..5d7343547 100644 --- a/rust/gui-client/src-tauri/src/client/gui.rs +++ b/rust/gui-client/src-tauri/src/client/gui.rs @@ -646,13 +646,14 @@ impl Controller { bail!("Impossible error: `Quit` should be handled before this") } Req::TunnelReady => { + if !self.tunnel_ready { + os::show_notification( + "Firezone connected", + "You are now signed in and able to access resources.", + )?; + } self.tunnel_ready = true; self.refresh_system_tray_menu()?; - - os::show_notification( - "Firezone connected", - "You are now signed in and able to access resources.", - )?; } Req::UpdateAvailable(release) => { let title = format!("Firezone {} available for download", release.tag_name);