This commit is contained in:
Xwite 2023-03-23 20:11:59 +08:00
parent e5da28d92b
commit 0e65493dbe
2 changed files with 3 additions and 4 deletions

View File

@ -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> {

View File

@ -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)
}