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 { 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)
} }
} }

@ -49,12 +49,8 @@ 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)
} }
} }

Loading…
Cancel
Save