|
|
@ -24,8 +24,8 @@ class SearchScopeDialog : BaseDialogFragment(R.layout.dialog_search_scope) { |
|
|
|
|
|
|
|
|
|
|
|
private val binding by viewBinding(DialogSearchScopeBinding::bind) |
|
|
|
private val binding by viewBinding(DialogSearchScopeBinding::bind) |
|
|
|
val callback: Callback get() = parentFragment as? Callback ?: activity as Callback |
|
|
|
val callback: Callback get() = parentFragment as? Callback ?: activity as Callback |
|
|
|
var groups: List<String> = arrayListOf() |
|
|
|
var groups = arrayListOf<String>() |
|
|
|
var sources: List<BookSource> = arrayListOf() |
|
|
|
var sources = arrayListOf<BookSource>() |
|
|
|
|
|
|
|
|
|
|
|
val adapter by lazy { |
|
|
|
val adapter by lazy { |
|
|
|
RecyclerAdapter() |
|
|
|
RecyclerAdapter() |
|
|
@ -74,8 +74,8 @@ class SearchScopeDialog : BaseDialogFragment(R.layout.dialog_search_scope) { |
|
|
|
private fun initData() { |
|
|
|
private fun initData() { |
|
|
|
launch { |
|
|
|
launch { |
|
|
|
withContext(IO) { |
|
|
|
withContext(IO) { |
|
|
|
groups = appDb.bookSourceDao.allGroups |
|
|
|
groups.addAll(appDb.bookSourceDao.allGroups) |
|
|
|
sources = appDb.bookSourceDao.allEnabled |
|
|
|
sources.addAll(appDb.bookSourceDao.allEnabled) |
|
|
|
} |
|
|
|
} |
|
|
|
upData() |
|
|
|
upData() |
|
|
|
} |
|
|
|
} |
|
|
|