Skip to content

Commit

Permalink
fix: change parameters from optional null lists into emptyLists()
Browse files Browse the repository at this point in the history
  • Loading branch information
galuszkak committed Nov 5, 2024
1 parent c9c917c commit b9053ea
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package nl.avisi.structurizr.site.generatr.site.model


data class DiagramIndexListViewModel(
val diagrams: List<DiagramViewModel>?,
val images: List<ImageViewViewModel>?,
val showList: Boolean = ((diagrams?.count() ?: 0) + (images?.count() ?: 0)) > 1
val diagrams: List<DiagramViewModel>,
val images: List<ImageViewViewModel>,
val showList: Boolean = (diagrams.count() + images.count()) > 1
)
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class SoftwareSystemContainerComponentCodePageViewModel(generatorContext: Genera
val containerTabs = createContainersCodeTabViewModel(generatorContext, container.softwareSystem)
val componentTabs = createComponentsTabViewModel(generatorContext, container)
val diagramIndexListViewModel = DiagramIndexListViewModel(
null,
emptyList(),
images
)
companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ class SoftwareSystemContextPageViewModel(generatorContext: GeneratorContext, sof
val visible = generatorContext.workspace.views.hasSystemContextViews(softwareSystem)
val diagramIndexListViewModel = DiagramIndexListViewModel(
diagrams,
null
emptyList()
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ class SoftwareSystemDeploymentPageViewModel(generatorContext: GeneratorContext,
val visible = generatorContext.workspace.views.hasDeploymentViews(softwareSystem)
val diagramIndexListViewModel = DiagramIndexListViewModel(
diagrams,
null
emptyList()
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ class SoftwareSystemDynamicPageViewModel(generatorContext: GeneratorContext, sof
val visible = generatorContext.workspace.views.hasDynamicViews(softwareSystem)
val diagramIndexListViewModel = DiagramIndexListViewModel(
diagrams,
null
emptyList()
)
}

0 comments on commit b9053ea

Please sign in to comment.