pull/48/head
kunfei 5 years ago
parent 812fcdf6e7
commit e7ac36825d
  1. 3
      app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceViewModel.kt
  2. 3
      app/src/main/res/layout/item_1line_text_and_del.xml

@ -11,7 +11,6 @@ import io.legado.app.help.http.HttpHelper
import io.legado.app.help.storage.OldRule
import io.legado.app.help.storage.Restore.jsonPath
import io.legado.app.utils.*
import kotlinx.coroutines.Dispatchers
import java.io.File
class BookSourceViewModel(application: Application) : BaseViewModel(application) {
@ -131,7 +130,7 @@ class BookSourceViewModel(application: Application) : BaseViewModel(application)
}
fun importSource(text: String) {
execute(context = Dispatchers.Main) {
execute {
val text1 = text.trim()
if (text1.isJsonObject()) {
val json = JsonPath.parse(text1)

@ -12,7 +12,8 @@
android:id="@+id/text_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_weight="1"
android:singleLine="true" />
<ImageView
android:id="@+id/iv_delete"

Loading…
Cancel
Save