From f6352d4e9756354ea821f697d9dc4df42eecc583 Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 3 Oct 2019 14:48:23 +0800 Subject: [PATCH] up --- .../app/ui/book/source/edit/BookSourceEditActivity.kt | 8 ++------ .../app/ui/rss/source/edit/RssSourceEditActivity.kt | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt b/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt index e2fdd270f..6362c947f 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.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) } } diff --git a/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditActivity.kt b/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditActivity.kt index 002818d82..5eed4540c 100644 --- a/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditActivity.kt +++ b/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditActivity.kt @@ -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) } }