mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
e5da28d92b
commit
0e65493dbe
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user