diff --git a/app/src/main/java/io/legado/app/ui/book/search/SearchScopeDialog.kt b/app/src/main/java/io/legado/app/ui/book/search/SearchScopeDialog.kt index 7c856d9fa..99d4d1dc8 100644 --- a/app/src/main/java/io/legado/app/ui/book/search/SearchScopeDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/search/SearchScopeDialog.kt @@ -24,8 +24,8 @@ class SearchScopeDialog : BaseDialogFragment(R.layout.dialog_search_scope) { private val binding by viewBinding(DialogSearchScopeBinding::bind) val callback: Callback get() = parentFragment as? Callback ?: activity as Callback - var groups: List = arrayListOf() - var sources: List = arrayListOf() + var groups = arrayListOf() + var sources = arrayListOf() val adapter by lazy { RecyclerAdapter() @@ -74,8 +74,8 @@ class SearchScopeDialog : BaseDialogFragment(R.layout.dialog_search_scope) { private fun initData() { launch { withContext(IO) { - groups = appDb.bookSourceDao.allGroups - sources = appDb.bookSourceDao.allEnabled + groups.addAll(appDb.bookSourceDao.allGroups) + sources.addAll(appDb.bookSourceDao.allEnabled) } upData() }