Skip to content

Commit 18bfa12

Browse files
committed
Fix: JSON field conflicting caused cannot open free content.
1 parent f418b7d commit 18bfa12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/java/cn/settile/fanboxviewer/Network/RESTfulClient/FanboxUserParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public List<DetailItem> getPostContent(String id) throws Exception{
106106
public List<DetailItem> getPostContent(JSONObject body) throws Exception{
107107
List<DetailItem> items = new ArrayList<>();
108108

109-
if(body.getBoolean("isRestricted")){
109+
if(body.optBoolean("isRestricted", true) && body.optInt("feeRequired", -1) != 0){
110110
items.add(new DetailItem(DetailItem.Type.TEXT,
111111
String.format(c.getString(R.string.plan_formatting), body.getInt("feeRequired"))));
112112
items.add(new DetailItem(DetailItem.Type.IMAGE, "false"));

0 commit comments

Comments
 (0)