|
|
@ -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() { |
|
|
|