Fixed module lists not being strictly typed in builder
This commit is contained in:
parent
833269fd0a
commit
f72de687c5
@ -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(
|
|||||||
@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 }
|
||||||
|
Loading…
Reference in New Issue
Block a user