From 4b9d68b3ba2cdf509502cf362e33fe35c2d28862 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 3 Aug 2019 09:05:58 +0800 Subject: [PATCH] up --- .../io/legado/app/ui/booksource/BookSourceActivity.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/java/io/legado/app/ui/booksource/BookSourceActivity.kt b/app/src/main/java/io/legado/app/ui/booksource/BookSourceActivity.kt index cd824cf00..fd849ad63 100644 --- a/app/src/main/java/io/legado/app/ui/booksource/BookSourceActivity.kt +++ b/app/src/main/java/io/legado/app/ui/booksource/BookSourceActivity.kt @@ -154,4 +154,12 @@ class BookSourceActivity : VMBaseActivity(R.layout.activity } } } + + override fun finish() { + if (search_view.query.isNullOrEmpty()) { + super.finish() + } else { + search_view.setQuery("", true) + } + } } \ No newline at end of file