|
|
@ -56,7 +56,12 @@ class SearchModel(private val scope: CoroutineScope, private val callBack: CallB |
|
|
|
if (searchGroup.isBlank()) { |
|
|
|
if (searchGroup.isBlank()) { |
|
|
|
bookSourceList.addAll(appDb.bookSourceDao.allEnabled) |
|
|
|
bookSourceList.addAll(appDb.bookSourceDao.allEnabled) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
bookSourceList.addAll(appDb.bookSourceDao.getEnabledByGroup(searchGroup)) |
|
|
|
val sources = appDb.bookSourceDao.getEnabledByGroup(searchGroup) |
|
|
|
|
|
|
|
if (sources.isEmpty()) { |
|
|
|
|
|
|
|
bookSourceList.addAll(appDb.bookSourceDao.allEnabled) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
bookSourceList.addAll(sources) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
searchPage++ |
|
|
|
searchPage++ |
|
|
|