mirror of
https://github.com/yusing/godoxy.git
synced 2026-01-11 22:30:47 +01:00
fix(homepage/icon): set icons provider on init (introduced in 74f97a6621)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user