hide deprecated versions from nav menu (again)

Tue, 11 May 2021 17:41:01 +0200

author
Mike Becker <universe@uap-core.de>
date
Tue, 11 May 2021 17:41:01 +0200
changeset 192
997e2c97ba34
parent 191
193ee4828767
child 193
1e4044d29b1c

hide deprecated versions from nav menu (again)

src/main/kotlin/de/uapcore/lightpit/viewmodel/NavMenus.kt file | annotate | diff | comparison | revisions
--- a/src/main/kotlin/de/uapcore/lightpit/viewmodel/NavMenus.kt	Tue May 11 17:36:00 2021 +0200
+++ b/src/main/kotlin/de/uapcore/lightpit/viewmodel/NavMenus.kt	Tue May 11 17:41:01 2021 +0200
@@ -28,6 +28,7 @@
 import de.uapcore.lightpit.entities.Component
 import de.uapcore.lightpit.entities.Project
 import de.uapcore.lightpit.entities.Version
+import de.uapcore.lightpit.types.VersionStatus
 
 class NavMenuEntry(
     val level: Int,
@@ -82,7 +83,7 @@
                         iconColor = "#000000"
                     )
                 )
-                for (version in versions) {
+                for (version in versions.filter { it.status != VersionStatus.Deprecated }) {
                     yield(
                         NavMenuEntry(
                             level = 2,

mercurial