fix: Release 包中部分页面预加载失败

This commit is contained in:
HuanCheng65 2023-09-22 19:16:25 +08:00
parent 1e99d0fe21
commit 3f1bd7b9b7
No known key found for this signature in database
GPG Key ID: 5EC9DD60A32C7360
4 changed files with 13 additions and 6 deletions

View File

@ -267,13 +267,20 @@
-keep,allowobfuscation,allowshrinking class com.huanchengfly.tieba.post.api.retrofit.ApiResult
-keep,allowobfuscation,allowshrinking class * extends com.huanchengfly.tieba.post.api.retrofit.ApiResult
-keep,allowobfuscation,allowshrinking interface retrofit2.Call
-keep,allowobfuscation,allowshrinking class retrofit2.Response
-keep,allowobfuscation,allowshrinking interface retrofit2.Call
-keep,allowobfuscation,allowshrinking class retrofit2.Response
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher.
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
-keep,allowobfuscation,allowshrinking class com.billy.android.preloader.** { *; }
-keep,allowobfuscation,allowshrinking class com.huanchengfly.tieba.post.utils.preload.** { *; }
-if interface * { @retrofit2.http.* <methods>; }
-keep,allowobfuscation interface <1>
-keepclassmembers,allowobfuscation class * {
@com.google.gson.annotations.SerializedName <fields>;
}

View File

@ -104,7 +104,7 @@ object ImageCacheUtil {
private fun getFolderSize(file: File): Long {
var size: Long = 0
try {
val fileList = file.listFiles()
val fileList = file.listFiles() ?: return 0
for (aFileList in fileList) {
size = if (aFileList.isDirectory) {
size + getFolderSize(aFileList)

View File

@ -10,7 +10,7 @@ import com.billy.android.preloader.interfaces.DataLoader;
public final class PreloadUtil {
public static final String EXTRA_PRELOAD_ID = "preload_id";
public static void startActivityWithPreload(Context context, Intent intent, DataLoader dataLoader) {
public static void startActivityWithPreload(Context context, Intent intent, DataLoader<?> dataLoader) {
context.startActivity(intent.putExtra(EXTRA_PRELOAD_ID, PreLoader.preLoad(dataLoader)));
}

View File

@ -4,7 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".fragments.PhotoViewFragment">
<com.github.panpf.sketch.zoom.SketchZoomImageView
<com.github.panpf.zoomimage.SketchZoomImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"