mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 09:18:31 +02: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"
|
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() {
|
func InitCache() {
|
||||||
m := make(IconMap)
|
m := make(IconMap)
|
||||||
err := serialization.LoadJSONIfExist(common.IconListCachePath, &m)
|
err := serialization.LoadJSONIfExist(common.IconListCachePath, &m)
|
||||||
|
|||||||
Reference in New Issue
Block a user