mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -23,9 +23,8 @@ object CheckSource {
|
||||
val summary get() = upSummary()
|
||||
|
||||
fun start(context: Context, sources: List<BookSource>) {
|
||||
val selectedIds: ArrayList<String> = arrayListOf()
|
||||
sources.map {
|
||||
selectedIds.add(it.bookSourceUrl)
|
||||
val selectedIds = sources.map {
|
||||
it.bookSourceUrl
|
||||
}
|
||||
IntentData.put("checkSourceSelectedIds", selectedIds)
|
||||
context.startService<CheckSourceService> {
|
||||
|
||||
@@ -66,7 +66,7 @@ class CheckSourceService : BaseService() {
|
||||
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
when (intent?.action) {
|
||||
IntentAction.start -> IntentData.get<ArrayList<String>>("checkSourceSelectedIds")?.let {
|
||||
IntentAction.start -> IntentData.get<List<String>>("checkSourceSelectedIds")?.let {
|
||||
check(it)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user