Commit f72de687 authored by Viktor De Pasquale's avatar Viktor De Pasquale

Fixed module lists not being strictly typed in builder

parent 833269fd
...@@ -105,7 +105,7 @@ class ModuleViewModel( ...@@ -105,7 +105,7 @@ class ModuleViewModel(
private val itemsInstalled private val itemsInstalled
@WorkerThread get() = items.filterIsInstance<ModuleItem>() @WorkerThread get() = items.filterIsInstance<ModuleItem>()
private val itemsUpdatable: List<RepoItem> private val itemsUpdatable
@WorkerThread get() = items.filterIsInstance<RepoItem.Update>() @WorkerThread get() = items.filterIsInstance<RepoItem.Update>()
private val itemsRemote private val itemsRemote
...@@ -282,8 +282,8 @@ class ModuleViewModel( ...@@ -282,8 +282,8 @@ class ModuleViewModel(
@WorkerThread @WorkerThread
private fun build( private fun build(
active: List<ModuleItem> = itemsInstalled, active: List<ModuleItem> = itemsInstalled,
updatable: List<RepoItem> = itemsUpdatable, updatable: List<RepoItem.Update> = itemsUpdatable,
remote: List<RepoItem> = itemsRemote remote: List<RepoItem.Remote> = itemsRemote
) = (active + InstallModule).prependIfNotEmpty { sectionActive } + ) = (active + InstallModule).prependIfNotEmpty { sectionActive } +
updatable.prependIfNotEmpty { sectionUpdate } + updatable.prependIfNotEmpty { sectionUpdate } +
remote.prependIfNotEmpty { sectionRemote } remote.prependIfNotEmpty { sectionRemote }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment