Browse Source

Pick app icon from the latest APK

It does not really matter that much which APK we take app icon from.
They rarely change and it's a question of aestetics.

Just take the latest icon version, like we do with app description.
pull/8/head
relan 10 years ago
parent
commit
712ea6ddd4
  1. 6
      index.go

6
index.go

@ -83,11 +83,11 @@ func getIconsDir(density IconDensity) string {
}
func (a *App) IconURLForDensity(density IconDensity) string {
cur := a.CurApk()
if cur == nil {
if len(a.Apks) == 0 {
return ""
}
return fmt.Sprintf("%s/%s/%s", cur.Repo.URL, getIconsDir(density), a.Icon)
return fmt.Sprintf("%s/%s/%s", a.Apks[0].Repo.URL,
getIconsDir(density), a.Icon)
}
func (a *App) IconURL() string {

Loading…
Cancel
Save