From 7f9defbb098b1873f65ad055c19758ec8a0fa114 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 2 Feb 2020 08:16:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/ui/main/bookshelf/BookshelfViewModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfViewModel.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfViewModel.kt index 0c4033587..71e2001a6 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfViewModel.kt @@ -45,7 +45,7 @@ class BookshelfViewModel(application: Application) : BaseViewModel(application) for (url in urls) { val bookUrl = url.trim() if (bookUrl.isEmpty()) continue - App.db.bookDao().getBook(bookUrl) ?: continue + if (App.db.bookDao().getBook(bookUrl) != null) continue val baseUrl = NetworkUtils.getBaseUrl(bookUrl) ?: continue var source = App.db.bookSourceDao().getBookSource(baseUrl) if (source == null) {