From f12f82e54e949af1aed60104c3a079ce1c772951 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 31 May 2020 20:16:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 2 +- app/src/main/assets/updateLog.md | 1 + app/src/main/java/io/legado/app/data/entities/Book.kt | 1 + app/src/main/java/io/legado/app/data/entities/SearchBook.kt | 2 ++ app/src/main/java/io/legado/app/utils/GsonExtensions.kt | 2 -- 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 33af4c2c3..a5068f755 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -56,7 +56,7 @@ android { signingConfig signingConfigs.myConfig } applicationIdSuffix '.release' - minifyEnabled true + minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } debug { diff --git a/app/src/main/assets/updateLog.md b/app/src/main/assets/updateLog.md index bb1c7beaa..51a0e2beb 100644 --- a/app/src/main/assets/updateLog.md +++ b/app/src/main/assets/updateLog.md @@ -7,6 +7,7 @@ * 更新到android studio 4.0 * 书源排序添加按url * 去除朗读通知的进度条 +* 修复恢复问题,暂时去除混淆 **2020/05/24** * 添加自动翻页速度调节 diff --git a/app/src/main/java/io/legado/app/data/entities/Book.kt b/app/src/main/java/io/legado/app/data/entities/Book.kt index 1bb69ea81..2889f1c99 100644 --- a/app/src/main/java/io/legado/app/data/entities/Book.kt +++ b/app/src/main/java/io/legado/app/data/entities/Book.kt @@ -71,6 +71,7 @@ data class Book( return bookUrl.hashCode() } + @delegate:Transient @delegate:Ignore @IgnoredOnParcel override val variableMap by lazy { diff --git a/app/src/main/java/io/legado/app/data/entities/SearchBook.kt b/app/src/main/java/io/legado/app/data/entities/SearchBook.kt index 72cdb721d..eb7ea0c10 100644 --- a/app/src/main/java/io/legado/app/data/entities/SearchBook.kt +++ b/app/src/main/java/io/legado/app/data/entities/SearchBook.kt @@ -63,6 +63,7 @@ data class SearchBook( return other.originOrder - this.originOrder } + @delegate:Transient @delegate:Ignore @IgnoredOnParcel override val variableMap by lazy { @@ -74,6 +75,7 @@ data class SearchBook( variable = GSON.toJson(variableMap) } + @delegate:Transient @delegate:Ignore @IgnoredOnParcel val origins: LinkedHashSet by lazy { linkedSetOf(origin) } diff --git a/app/src/main/java/io/legado/app/utils/GsonExtensions.kt b/app/src/main/java/io/legado/app/utils/GsonExtensions.kt index 773cd8030..32870d7b2 100644 --- a/app/src/main/java/io/legado/app/utils/GsonExtensions.kt +++ b/app/src/main/java/io/legado/app/utils/GsonExtensions.kt @@ -22,7 +22,6 @@ val GSON: Gson by lazy { inline fun genericType(): Type = object : TypeToken() {}.type -@Throws(JsonSyntaxException::class) inline fun Gson.fromJsonObject(json: String?): T? {//可转成任意类型 return attempt { val result: T? = fromJson(json, genericType()) @@ -30,7 +29,6 @@ inline fun Gson.fromJsonObject(json: String?): T? {//可转成任意 }.value } -@Throws(JsonSyntaxException::class) inline fun Gson.fromJsonArray(json: String?): List? { return attempt { val result: List? = fromJson(json, ParameterizedTypeImpl(T::class.java))