Skip to content

A self-hosted dashboard that puts all your feeds in one place

Make auto-invert work with prefixed icons

Svilen Markov88d8fa56fb61
diff --git a/internal/glance/config-fields.go b/internal/glance/config-fields.go
index d368140..1527c72 100644
--- a/internal/glance/config-fields.go
+++ b/internal/glance/config-fields.go
@@ -141,13 +141,13 @@ func newCustomIconField(value string) customIconField {
const autoInvertPrefix = "auto-invert "
field := customIconField{}
+ if strings.HasPrefix(value, autoInvertPrefix) {
+ field.IsFlatIcon = true
+ value = strings.TrimPrefix(value, autoInvertPrefix)
+ }
+
prefix, icon, found := strings.Cut(value, ":")
if !found {
- if strings.HasPrefix(value, autoInvertPrefix) {
- field.IsFlatIcon = true
- value = strings.TrimPrefix(value, autoInvertPrefix)
- }
-
field.URL = template.URL(value)
return field
}