pull/32/head
kunfei 5 years ago
parent f05cf0274d
commit 728ba09679
  1. 9
      app/src/main/java/io/legado/app/ui/sourcedebug/SourceDebugActivity.kt

@ -16,6 +16,7 @@ import io.legado.app.utils.getViewModel
import io.legado.app.utils.hideSoftInput import io.legado.app.utils.hideSoftInput
import kotlinx.android.synthetic.main.activity_source_debug.* import kotlinx.android.synthetic.main.activity_source_debug.*
import kotlinx.android.synthetic.main.view_title_bar.* import kotlinx.android.synthetic.main.view_title_bar.*
import kotlinx.coroutines.launch
import org.jetbrains.anko.startActivityForResult import org.jetbrains.anko.startActivityForResult
import org.jetbrains.anko.toast import org.jetbrains.anko.toast
@ -32,9 +33,11 @@ class SourceDebugActivity : VMBaseActivity<SourceDebugModel>(R.layout.activity_s
initRecyclerView() initRecyclerView()
initSearchView() initSearchView()
viewModel.observe{state, msg-> viewModel.observe{state, msg->
adapter.addItem(msg) launch {
if (state == -1 || state == 1000) { adapter.addItem(msg)
rotate_loading.hide() if (state == -1 || state == 1000) {
rotate_loading.hide()
}
} }
} }
} }

Loading…
Cancel
Save