Skip to content

Commit

Permalink
Fix: API doc changed
Browse files Browse the repository at this point in the history
feeRequired will never be null,
New field isRestricted for checking whether a post is accessable.
  • Loading branch information
709924470 committed Nov 15, 2022
1 parent 343e362 commit 5790d8f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public List<DetailItem> getPostContent(String id) throws Exception{
public List<DetailItem> getPostContent(JSONObject body) throws Exception{
List<DetailItem> 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"));
Expand Down

0 comments on commit 5790d8f

Please sign in to comment.