From f72de687c57f939747b6fda46a67c5375f3a8aa3 Mon Sep 17 00:00:00 2001 From: Viktor De Pasquale Date: Tue, 19 Nov 2019 15:56:10 +0100 Subject: [PATCH] Fixed module lists not being strictly typed in builder --- .../com/topjohnwu/magisk/redesign/module/ModuleViewModel.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/redesign/module/ModuleViewModel.kt b/app/src/main/java/com/topjohnwu/magisk/redesign/module/ModuleViewModel.kt index ef0ab6a8a..d4c306604 100644 --- a/app/src/main/java/com/topjohnwu/magisk/redesign/module/ModuleViewModel.kt +++ b/app/src/main/java/com/topjohnwu/magisk/redesign/module/ModuleViewModel.kt @@ -105,7 +105,7 @@ class ModuleViewModel( private val itemsInstalled @WorkerThread get() = items.filterIsInstance() - private val itemsUpdatable: List + private val itemsUpdatable @WorkerThread get() = items.filterIsInstance() private val itemsRemote @@ -282,8 +282,8 @@ class ModuleViewModel( @WorkerThread private fun build( active: List = itemsInstalled, - updatable: List = itemsUpdatable, - remote: List = itemsRemote + updatable: List = itemsUpdatable, + remote: List = itemsRemote ) = (active + InstallModule).prependIfNotEmpty { sectionActive } + updatable.prependIfNotEmpty { sectionUpdate } + remote.prependIfNotEmpty { sectionRemote }