Fix all staticcheck errors that are not deprecations
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user