client/systray: only send clipboard notification on success

Fixes #14430

Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d
Signed-off-by: Will Norris <will@tailscale.com>
This commit is contained in:
Will Norris
2025-09-15 09:04:00 -07:00
committed by Will Norris
parent b816fd7117
commit 082c6a25b0

View File

@@ -540,9 +540,9 @@ func (menu *Menu) copyTailscaleIP(device *ipnstate.PeerStatus) {
err := clipboard.WriteAll(ip)
if err != nil {
log.Printf("clipboard error: %v", err)
} else {
menu.sendNotification(fmt.Sprintf("Copied Address for %v", name), ip)
}
menu.sendNotification(fmt.Sprintf("Copied Address for %v", name), ip)
}
// sendNotification sends a desktop notification with the given title and content.