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:
@@ -540,9 +540,9 @@ func (menu *Menu) copyTailscaleIP(device *ipnstate.PeerStatus) {
|
|||||||
err := clipboard.WriteAll(ip)
|
err := clipboard.WriteAll(ip)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("clipboard error: %v", err)
|
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.
|
// sendNotification sends a desktop notification with the given title and content.
|
||||||
|
|||||||
Reference in New Issue
Block a user