mirror of
https://github.com/ninxsoft/Mist.git
synced 2025-05-18 17:25:21 -04:00
Sort versions by semver
This commit is contained in:
parent
8a4fb34f77
commit
6c7ba4cb65
1 changed files with 5 additions and 1 deletions
|
@ -153,7 +153,11 @@ struct RefreshView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
installers.sort { $0.version == $1.version ? ($0.build.count == $1.build.count ? $0.build > $1.build : $0.build.count > $1.build.count) : $0.version > $1.version }
|
installers.sort {
|
||||||
|
$0.version == $1.version ?
|
||||||
|
($0.build.count == $1.build.count ? $0.build > $1.build : $0.build.count > $1.build.count) :
|
||||||
|
$0.version.compare($1.version, options: .numeric) == .orderedDescending
|
||||||
|
}
|
||||||
|
|
||||||
guard !installers.isEmpty else {
|
guard !installers.isEmpty else {
|
||||||
throw MistError.invalidData
|
throw MistError.invalidData
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue