From 29f8f6be2036ea9fda1969a28a46413da4f6c2e8 Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 25 Mar 2022 17:47:47 +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 --- .../app/ui/book/search/SearchActivity.kt | 24 ++++++++++++++++++- .../app/ui/book/search/SearchViewModel.kt | 2 ++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt b/app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt index 371a55657..43e6baf65 100644 --- a/app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt @@ -22,6 +22,7 @@ import io.legado.app.data.appDb import io.legado.app.data.entities.Book import io.legado.app.data.entities.SearchKeyword import io.legado.app.databinding.ActivityBookSearchBinding +import io.legado.app.lib.dialogs.alert import io.legado.app.lib.theme.* import io.legado.app.ui.book.info.BookInfoActivity import io.legado.app.ui.book.source.manage.BookSourceActivity @@ -71,6 +72,22 @@ class SearchActivity : VMBaseActivity Unit)? = null var isSearchLiveData = MutableLiveData() var searchKey: String = "" private var searchID = 0L @@ -32,6 +33,7 @@ class SearchViewModel(application: Application) : BaseViewModel(application) { override fun onSearchFinish(isEmpty: Boolean) { isSearchLiveData.postValue(false) + searchFinishCallback?.invoke(isEmpty) } override fun onSearchCancel() {