Merge remote-tracking branch 'origin/4.0-dev' into 4.0-dev
This commit is contained in:
commit
55ebc34007
|
|
@ -38,11 +38,11 @@
|
|||
-dontnote com.google.android.material.**
|
||||
-dontwarn androidx.**
|
||||
|
||||
-keepclasseswithmembernames class * {
|
||||
-keepclasseswithmembers class * {
|
||||
public <init>(android.content.Context, android.util.AttributeSet);
|
||||
}
|
||||
|
||||
-keepclasseswithmembernames class * {
|
||||
-keepclasseswithmembers class * {
|
||||
public <init>(android.content.Context, android.util.AttributeSet, int);
|
||||
}
|
||||
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
void *(**On*Listener);
|
||||
}
|
||||
# 保留本地native方法不被混淆
|
||||
-keepclasseswithmembernames class * {
|
||||
-keepclasseswithmembers class * {
|
||||
native <methods>;
|
||||
}
|
||||
|
||||
|
|
@ -253,4 +253,4 @@
|
|||
-keep class androidx.recyclerview.widget.RecyclerView$ViewHolder { *; }
|
||||
-keep class androidx.recyclerview.widget.RecyclerView$LayoutManager { *; }
|
||||
|
||||
-keep class com.huanchengfly.tieba.post.plugins.** { *; }
|
||||
-keep class com.huanchengfly.tieba.post.plugins.** { *; }
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
package com.huanchengfly.tieba.post.api.adapters;
|
||||
|
||||
import com.google.gson.JsonDeserializationContext;
|
||||
import com.google.gson.JsonDeserializer;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.huanchengfly.tieba.post.api.models.ThreadContentBean;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ContentMsgAdapter implements JsonDeserializer<List<ThreadContentBean.ContentBean>> {
|
||||
@Override
|
||||
public List<ThreadContentBean.ContentBean> deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
|
||||
List<ThreadContentBean.ContentBean> list = new ArrayList<>();
|
||||
if(json.isJsonArray()){
|
||||
json.getAsJsonArray().forEach(element->{
|
||||
if(element.isJsonObject()){
|
||||
list.add(context.deserialize(element,ThreadContentBean.ContentBean.class));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ package com.huanchengfly.tieba.post.api.models
|
|||
|
||||
import com.google.gson.annotations.JsonAdapter
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.huanchengfly.tieba.post.api.adapters.ContentMsgAdapter
|
||||
import com.huanchengfly.tieba.post.api.adapters.PortraitAdapter
|
||||
import com.huanchengfly.tieba.post.api.adapters.SubPostListAdapter
|
||||
import com.huanchengfly.tieba.post.models.BaseBean
|
||||
|
|
@ -158,6 +159,7 @@ class ThreadContentBean : BaseBean() {
|
|||
|
||||
class OriginThreadInfo {
|
||||
val title: String? = null
|
||||
@JsonAdapter(ContentMsgAdapter::class)
|
||||
val content: List<ContentBean>? = null
|
||||
}
|
||||
|
||||
|
|
@ -166,6 +168,7 @@ class ThreadContentBean : BaseBean() {
|
|||
val title: String? = null
|
||||
val floor: String? = null
|
||||
val time: String? = null
|
||||
@JsonAdapter(ContentMsgAdapter::class)
|
||||
val content: List<ContentBean>? = null
|
||||
val agree: AgreeBean? = null
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue