From 8bfb4ac3d5e6f691cf21c1fd46d1e27616a28e8a Mon Sep 17 00:00:00 2001 From: gedoor Date: Mon, 11 Apr 2022 17:16:15 +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/build.gradle | 1 + app/src/main/java/io/legado/app/help/config/AppConfig.kt | 2 +- .../io/legado/app/ui/book/explore/ExploreShowAdapter.kt | 8 +++++++- .../java/io/legado/app/ui/book/search/SearchAdapter.kt | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index dbc180c8d..7e08dee33 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -157,6 +157,7 @@ dependencies { implementation('androidx.viewpager2:viewpager2:1.0.0') implementation('androidx.webkit:webkit:1.4.0') + //google implementation('com.google.android.material:material:1.5.0') implementation('com.google.android.flexbox:flexbox:3.0.0') implementation('com.google.code.gson:gson:2.9.0') diff --git a/app/src/main/java/io/legado/app/help/config/AppConfig.kt b/app/src/main/java/io/legado/app/help/config/AppConfig.kt index d9a045a2a..c0bf7709e 100644 --- a/app/src/main/java/io/legado/app/help/config/AppConfig.kt +++ b/app/src/main/java/io/legado/app/help/config/AppConfig.kt @@ -304,7 +304,7 @@ object AppConfig : SharedPreferences.OnSharedPreferenceChangeListener { val recordLog get() = appCtx.getPrefBoolean(PreferKey.recordLog) - val loadOnlyWifi = appCtx.getPrefBoolean(PreferKey.loadCoverOnlyWifi, false) + val loadCoverOnlyWifi = appCtx.getPrefBoolean(PreferKey.loadCoverOnlyWifi, false) val doublePageHorizontal: Boolean get() = appCtx.getPrefBoolean(PreferKey.doublePageHorizontal, true) diff --git a/app/src/main/java/io/legado/app/ui/book/explore/ExploreShowAdapter.kt b/app/src/main/java/io/legado/app/ui/book/explore/ExploreShowAdapter.kt index dc85cca72..4505c0793 100644 --- a/app/src/main/java/io/legado/app/ui/book/explore/ExploreShowAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/explore/ExploreShowAdapter.kt @@ -43,7 +43,13 @@ class ExploreShowAdapter(context: Context, val callBack: CallBack) : llKind.visible() llKind.setLabels(kinds) } - ivCover.load(item.coverUrl, item.name, item.author, AppConfig.loadOnlyWifi, item.origin) + ivCover.load( + item.coverUrl, + item.name, + item.author, + AppConfig.loadCoverOnlyWifi, + item.origin + ) } } diff --git a/app/src/main/java/io/legado/app/ui/book/search/SearchAdapter.kt b/app/src/main/java/io/legado/app/ui/book/search/SearchAdapter.kt index f31dea1ff..6e70f193c 100644 --- a/app/src/main/java/io/legado/app/ui/book/search/SearchAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/search/SearchAdapter.kt @@ -86,7 +86,7 @@ class SearchAdapter(context: Context, val callBack: CallBack) : searchBook.coverUrl, searchBook.name, searchBook.author, - AppConfig.loadOnlyWifi, + AppConfig.loadCoverOnlyWifi, searchBook.origin ) }