|
|
@ -1,12 +1,16 @@ |
|
|
|
package io.legado.app.ui.book.search |
|
|
|
package io.legado.app.ui.book.search |
|
|
|
|
|
|
|
|
|
|
|
import android.content.Context |
|
|
|
import android.content.Context |
|
|
|
|
|
|
|
import io.legado.app.App |
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.base.adapter.ItemViewHolder |
|
|
|
import io.legado.app.base.adapter.ItemViewHolder |
|
|
|
import io.legado.app.base.adapter.SimpleRecyclerAdapter |
|
|
|
import io.legado.app.base.adapter.SimpleRecyclerAdapter |
|
|
|
import io.legado.app.data.entities.SearchKeyword |
|
|
|
import io.legado.app.data.entities.SearchKeyword |
|
|
|
import io.legado.app.ui.widget.anima.explosion_field.ExplosionField |
|
|
|
import io.legado.app.ui.widget.anima.explosion_field.ExplosionField |
|
|
|
import kotlinx.android.synthetic.main.item_text.view.* |
|
|
|
import kotlinx.android.synthetic.main.item_text.view.* |
|
|
|
|
|
|
|
import kotlinx.coroutines.Dispatchers.IO |
|
|
|
|
|
|
|
import kotlinx.coroutines.GlobalScope |
|
|
|
|
|
|
|
import kotlinx.coroutines.launch |
|
|
|
import org.jetbrains.anko.sdk27.listeners.onClick |
|
|
|
import org.jetbrains.anko.sdk27.listeners.onClick |
|
|
|
import org.jetbrains.anko.sdk27.listeners.onLongClick |
|
|
|
import org.jetbrains.anko.sdk27.listeners.onLongClick |
|
|
|
|
|
|
|
|
|
|
@ -24,7 +28,9 @@ class HistoryKeyAdapter(context: Context, val callBack: CallBack) : |
|
|
|
it?.let { |
|
|
|
it?.let { |
|
|
|
ExplosionField(context).explode(it, true) |
|
|
|
ExplosionField(context).explode(it, true) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
GlobalScope.launch(IO) { |
|
|
|
|
|
|
|
App.db.searchKeywordDao().delete(item) |
|
|
|
|
|
|
|
} |
|
|
|
true |
|
|
|
true |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|