fixes latest version not including all releases

Sat, 05 Jun 2021 09:08:29 +0200

author
Mike Becker <universe@uap-core.de>
date
Sat, 05 Jun 2021 09:08:29 +0200
changeset 201
73c632c1c7e5
parent 200
a5ddfaf6b469
child 202
bbfc46ed3520

fixes latest version not including all releases

src/main/kotlin/de/uapcore/lightpit/viewmodel/Projects.kt file | annotate | diff | comparison | revisions
--- a/src/main/kotlin/de/uapcore/lightpit/viewmodel/Projects.kt	Sat Jun 05 09:04:13 2021 +0200
+++ b/src/main/kotlin/de/uapcore/lightpit/viewmodel/Projects.kt	Sat Jun 05 09:08:29 2021 +0200
@@ -26,7 +26,6 @@
 package de.uapcore.lightpit.viewmodel
 
 import de.uapcore.lightpit.entities.*
-import de.uapcore.lightpit.types.VersionStatus
 
 class ProjectInfo(
     val project: Project,
@@ -37,7 +36,7 @@
     var components: List<Component>,
     var issueSummary: IssueSummary
 ) {
-    val latestVersion = versions.firstOrNull { it.status == VersionStatus.Released }
+    val latestVersion = versions.firstOrNull { it.status.isReleased }
     val nextVersion = versions.findLast { !it.status.isReleased }
 }
 

mercurial