mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 12:54:38 +03:00
Fix lint error on macOS (#3533)
This commit is contained in:
@@ -9,6 +9,8 @@ import (
|
|||||||
"github.com/kermieisinthehouse/systray"
|
"github.com/kermieisinthehouse/systray"
|
||||||
"github.com/stashapp/stash/internal/manager/config"
|
"github.com/stashapp/stash/internal/manager/config"
|
||||||
"github.com/stashapp/stash/pkg/logger"
|
"github.com/stashapp/stash/pkg/logger"
|
||||||
|
"golang.org/x/text/cases"
|
||||||
|
"golang.org/x/text/language"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MUST be run on the main goroutine or will have no effect on macOS
|
// MUST be run on the main goroutine or will have no effect on macOS
|
||||||
@@ -55,7 +57,8 @@ func systrayInitialize(shutdownHandler ShutdownHandler, faviconProvider FaviconP
|
|||||||
if !c.IsNewSystem() {
|
if !c.IsNewSystem() {
|
||||||
menuItems = c.GetMenuItems()
|
menuItems = c.GetMenuItems()
|
||||||
for _, item := range menuItems {
|
for _, item := range menuItems {
|
||||||
titleCaseItem := strings.Title(strings.ToLower(item))
|
c := cases.Title(language.Und)
|
||||||
|
titleCaseItem := c.String(strings.ToLower(item))
|
||||||
curr := systray.AddMenuItem(titleCaseItem, "Open to "+titleCaseItem)
|
curr := systray.AddMenuItem(titleCaseItem, "Open to "+titleCaseItem)
|
||||||
go func(item string) {
|
go func(item string) {
|
||||||
for {
|
for {
|
||||||
|
|||||||
Reference in New Issue
Block a user