pull/35/head^2
kunfei 5 years ago
parent be95698ea7
commit f6352d4e97
  1. 4
      app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt
  2. 4
      app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditActivity.kt

@ -54,13 +54,9 @@ class BookSourceEditActivity :
viewModel.sourceLiveData.observe(this, Observer { viewModel.sourceLiveData.observe(this, Observer {
upRecyclerView(it) upRecyclerView(it)
}) })
if (viewModel.sourceLiveData.value == null) {
intent.getStringExtra("data")?.let { intent.getStringExtra("data")?.let {
viewModel.setBookSource(it) viewModel.setBookSource(it)
} }
} else {
upRecyclerView(viewModel.sourceLiveData.value)
}
} }
override fun onDestroy() { override fun onDestroy() {

@ -49,13 +49,9 @@ class RssSourceEditActivity :
viewModel.sourceLiveData.observe(this, Observer { viewModel.sourceLiveData.observe(this, Observer {
upRecyclerView(it) upRecyclerView(it)
}) })
if (viewModel.sourceLiveData.value == null) {
intent.getStringExtra("data")?.let { intent.getStringExtra("data")?.let {
viewModel.setSource(it) viewModel.setSource(it)
} }
} else {
upRecyclerView(viewModel.sourceLiveData.value)
}
} }
override fun onDestroy() { override fun onDestroy() {

Loading…
Cancel
Save