Fix all staticcheck errors that are not deprecations

This commit is contained in:
Jacalz
2025-09-17 22:39:36 +02:00
parent 08f335da44
commit ebc5b7e039
5 changed files with 15 additions and 22 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ package controller
import (
"archive/zip"
"errors"
"fmt"
"image"
"image/color"
@@ -546,7 +547,7 @@ func (c *Controller) sendNotification(title, content string) {
func (c *Controller) showError(content string) {
// TODO: display an in-app toast message instead of a dialog.
dialog.ShowError(fmt.Errorf(content), c.MainWindow)
dialog.ShowError(errors.New(content), c.MainWindow)
}
func (c *Controller) ShowAlbumInfoDialog(albumID, albumName string, albumCover image.Image) {
+2 -3
View File
@@ -378,11 +378,10 @@ func setPlayBtnTranslucency(f float32) {
// get theme Primary color as color.NRGBA
var primary color.NRGBA
switch pr := theme.Color(theme.ColorNamePrimary); pr.(type) {
switch pr := theme.Color(theme.ColorNamePrimary).(type) {
case color.NRGBA:
primary = pr.(color.NRGBA)
primary = pr
case color.RGBA:
pr := pr.(color.RGBA)
primary = color.NRGBA{R: pr.R, G: pr.G, B: pr.B, A: pr.A}
}