🎨 One-click upgrade of downloaded marketplace packages https://github.com/siyuan-note/siyuan/issues/8390

This commit is contained in:
Daniel 2024-03-21 17:10:14 +08:00
parent 055e011b3e
commit d793155e55
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -35,27 +35,52 @@ func UpdatedPackages(frontend string) (plugins []*bazaar.Plugin, widgets []*baza
wg.Add(5)
go func() {
defer wg.Done()
plugins = InstalledPlugins(frontend, "")
tmp := InstalledPlugins(frontend, "")
for _, plugin := range tmp {
if plugin.Outdated {
plugins = append(plugins, plugin)
}
}
}()
go func() {
defer wg.Done()
widgets = InstalledWidgets("")
tmp := InstalledWidgets("")
for _, widget := range tmp {
if widget.Outdated {
widgets = append(widgets, widget)
}
}
}()
go func() {
defer wg.Done()
icons = InstalledIcons("")
tmp := InstalledIcons("")
for _, icon := range tmp {
if icon.Outdated {
icons = append(icons, icon)
}
}
}()
go func() {
defer wg.Done()
themes = InstalledThemes("")
tmp := InstalledThemes("")
for _, theme := range tmp {
if theme.Outdated {
themes = append(themes, theme)
}
}
}()
go func() {
defer wg.Done()
templates = InstalledTemplates("")
tmp := InstalledTemplates("")
for _, template := range tmp {
if template.Outdated {
templates = append(templates, template)
}
}
}()
wg.Wait()