From 5790d8fe7c7057fada5e556f0fabb8c4be436d0b Mon Sep 17 00:00:00 2001 From: Walter_J Date: Wed, 16 Nov 2022 01:40:55 +0800 Subject: [PATCH] Fix: API doc changed feeRequired will never be null, New field isRestricted for checking whether a post is accessable. --- .../fanboxviewer/Network/RESTfulClient/FanboxUserParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/cn/settile/fanboxviewer/Network/RESTfulClient/FanboxUserParser.java b/app/src/main/java/cn/settile/fanboxviewer/Network/RESTfulClient/FanboxUserParser.java index 1594e45..2b59177 100644 --- a/app/src/main/java/cn/settile/fanboxviewer/Network/RESTfulClient/FanboxUserParser.java +++ b/app/src/main/java/cn/settile/fanboxviewer/Network/RESTfulClient/FanboxUserParser.java @@ -106,7 +106,7 @@ public List getPostContent(String id) throws Exception{ public List getPostContent(JSONObject body) throws Exception{ List items = new ArrayList<>(); - if(!body.getString("feeRequired").equals("null")){ + if(body.getBoolean("isRestricted")){ items.add(new DetailItem(DetailItem.Type.TEXT, String.format(c.getString(R.string.plan_formatting), body.getInt("feeRequired")))); items.add(new DetailItem(DetailItem.Type.IMAGE, "false"));