From c6ed6abc146781c268dee2a437e95f8238268f04 Mon Sep 17 00:00:00 2001 From: gedoor Date: Wed, 9 Sep 2020 16:01:06 +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 --- .../io/legado/app/data/entities/BookSource.kt | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/io/legado/app/data/entities/BookSource.kt b/app/src/main/java/io/legado/app/data/entities/BookSource.kt index bddfe1ab5..3af66f972 100644 --- a/app/src/main/java/io/legado/app/data/entities/BookSource.kt +++ b/app/src/main/java/io/legado/app/data/entities/BookSource.kt @@ -12,7 +12,6 @@ import io.legado.app.help.JsExtensions import io.legado.app.utils.* import kotlinx.android.parcel.Parcelize import javax.script.SimpleBindings -import kotlin.collections.HashMap @Parcelize @TypeConverters(BookSource.Converters::class) @@ -165,31 +164,31 @@ data class BookSource( class Converters { @TypeConverter - fun exploreRuleToString(exploreRule: ExploreRule?) = GSON.toJson(exploreRule) + fun exploreRuleToString(exploreRule: ExploreRule?): String = GSON.toJson(exploreRule) @TypeConverter fun stringToExploreRule(json: String?) = GSON.fromJsonObject(json) - + @TypeConverter - fun searchRuleToString(searchRule: SearchRule?) = GSON.toJson(searchRule) + fun searchRuleToString(searchRule: SearchRule?): String = GSON.toJson(searchRule) @TypeConverter fun stringToSearchRule(json: String?) = GSON.fromJsonObject(json) - + @TypeConverter - fun bookInfoRuleToString(bookInfoRule: BookInfoRule?) = GSON.toJson(bookInfoRule) + fun bookInfoRuleToString(bookInfoRule: BookInfoRule?): String = GSON.toJson(bookInfoRule) @TypeConverter fun stringToBookInfoRule(json: String?) = GSON.fromJsonObject(json) - + @TypeConverter - fun tocRuleToString(tocRule: TocRule?) = GSON.toJson(tocRule) + fun tocRuleToString(tocRule: TocRule?): String = GSON.toJson(tocRule) @TypeConverter fun stringToTocRule(json: String?) = GSON.fromJsonObject(json) @TypeConverter - fun contentRuleToString(contentRule: ContentRule?) = GSON.toJson(contentRule) + fun contentRuleToString(contentRule: ContentRule?): String = GSON.toJson(contentRule) @TypeConverter fun stringToContentRule(json: String?) = GSON.fromJsonObject(json)