src/main/kotlin/de/uapcore/lightpit/viewmodel/Feeds.kt

changeset 199
59393c8cc557
parent 198
94f174d591ab
child 235
4258b9e010ae
     1.1 --- a/src/main/kotlin/de/uapcore/lightpit/viewmodel/Feeds.kt	Thu May 13 19:31:09 2021 +0200
     1.2 +++ b/src/main/kotlin/de/uapcore/lightpit/viewmodel/Feeds.kt	Sat May 15 16:19:29 2021 +0200
     1.3 @@ -27,12 +27,12 @@
     1.4  
     1.5  import de.uapcore.lightpit.entities.Issue
     1.6  import de.uapcore.lightpit.entities.Project
     1.7 -
     1.8 -class ProjectFeed(
     1.9 -    val projects: List<Project>
    1.10 -) : View()
    1.11 +import java.sql.Timestamp
    1.12 +import java.time.Instant
    1.13  
    1.14  class IssueFeed(
    1.15      val project: Project,
    1.16      val issues: List<Issue>
    1.17 -) : View()
    1.18 \ No newline at end of file
    1.19 +) : View() {
    1.20 +    val lastModified = issues.map(Issue::updated).maxOrNull() ?: Timestamp.from(Instant.now())
    1.21 +}
    1.22 \ No newline at end of file

mercurial