Browse Source

If CVCode is 0, take the highest version.

The Android client does this as well.
pull/8/head
Daniel Martí 11 years ago
parent
commit
5fedeb8671
  1. 6
      index.go

6
index.go

@ -240,6 +240,12 @@ func LoadIndexXml(r io.Reader) (*Index, error) {
}
func (app *App) CurApk() *Apk {
if app.CVCode == 0 {
if len(app.Apks) > 0 {
return &app.Apks[0]
}
return nil
}
for i := range app.Apks {
apk := app.Apks[i]
if app.CVCode >= apk.VCode {

Loading…
Cancel
Save