fix(homepage/icon): set icons provider on init (introduced in 74f97a6621)

This commit is contained in:
yusing
2026-01-09 21:41:32 +08:00
parent d1448c886d
commit 6cf31541d9

View File

@@ -43,6 +43,16 @@ const (
selfhstIcons = "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/index.json"
)
type provider struct{}
func (p provider) HasIcon(u *icons.URL) bool {
return HasIcon(u)
}
func init() {
icons.SetProvider(provider{})
}
func InitCache() {
m := make(IconMap)
err := serialization.LoadJSONIfExist(common.IconListCachePath, &m)