update mac notification (#6329)

This commit is contained in:
Gykes 2025-11-27 18:48:23 -06:00 committed by GitHub
parent a3ed381901
commit 97c01c70b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,6 +3,7 @@
package desktop package desktop
import ( import (
"runtime"
"strings" "strings"
"github.com/kermieisinthehouse/systray" "github.com/kermieisinthehouse/systray"
@ -20,7 +21,12 @@ func startSystray(exit chan int, faviconProvider FaviconProvider) {
// system is started from a non-terminal method, e.g. double-clicking an icon. // system is started from a non-terminal method, e.g. double-clicking an icon.
c := config.GetInstance() c := config.GetInstance()
if c.GetShowOneTimeMovedNotification() { if c.GetShowOneTimeMovedNotification() {
SendNotification("Stash has moved!", "Stash now runs in your tray, instead of a terminal window.") // Use platform-appropriate terminology
location := "tray"
if runtime.GOOS == "darwin" {
location = "menu bar"
}
SendNotification("Stash has moved!", "Stash now runs in your "+location+", instead of a terminal window.")
c.SetBool(config.ShowOneTimeMovedNotification, false) c.SetBool(config.ShowOneTimeMovedNotification, false)
if err := c.Write(); err != nil { if err := c.Write(); err != nil {
logger.Errorf("Error while writing configuration file: %v", err) logger.Errorf("Error while writing configuration file: %v", err)