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

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

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

Loading…
Cancel
Save