From 8b816b5a70e41eae508a06188aca50a28ea8066a Mon Sep 17 00:00:00 2001 From: tom79 Date: Sat, 8 Feb 2020 18:02:50 +0100 Subject: [PATCH] Prepare release 2.30.0 --- .../java/app/fedilab/android/client/API.java | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/app/fedilab/android/client/API.java b/app/src/main/java/app/fedilab/android/client/API.java index ced9d6a83..91cc46108 100644 --- a/app/src/main/java/app/fedilab/android/client/API.java +++ b/app/src/main/java/app/fedilab/android/client/API.java @@ -4377,6 +4377,12 @@ public class API { case UNPIN: action = String.format("/statuses/%s/unpin", targetedId); break; + case REACT: + action = String.format("/pleroma/statuses/%s/react_with_emoji", targetedId); + break; + case UNREACT: + action = String.format("/pleroma/statuses/%s/unreact_with_emoji", targetedId); + break; case ENDORSE: action = String.format("/accounts/%s/pin", targetedId); break; @@ -5894,21 +5900,21 @@ public class API { private Trends parseTrends(JSONObject resobj) { Trends trend = new Trends(); try { - trend.setName(resobj.getString("name")); - trend.setUrl(resobj.getString("url")); - List historyList = new ArrayList<>(); - if( resobj.has("history")) { - JSONArray histories = resobj.getJSONArray("history"); - for(int i = 0 ; i < histories.length() ; i++ ) { - JSONObject hystory = histories.getJSONObject(i); - TrendsHistory trendsHistory = new TrendsHistory(); - trendsHistory.setDays(hystory.getLong("day")); - trendsHistory.setUses(hystory.getInt("uses")); - trendsHistory.setAccounts(hystory.getInt("accounts")); - historyList.add(trendsHistory); - } - } - trend.setTrendsHistory(historyList); + trend.setName(resobj.getString("name")); + trend.setUrl(resobj.getString("url")); + List historyList = new ArrayList<>(); + if( resobj.has("history")) { + JSONArray histories = resobj.getJSONArray("history"); + for(int i = 0 ; i < histories.length() ; i++ ) { + JSONObject hystory = histories.getJSONObject(i); + TrendsHistory trendsHistory = new TrendsHistory(); + trendsHistory.setDays(hystory.getLong("day")); + trendsHistory.setUses(hystory.getInt("uses")); + trendsHistory.setAccounts(hystory.getInt("accounts")); + historyList.add(trendsHistory); + } + } + trend.setTrendsHistory(historyList); } catch (JSONException ignored) { } return trend; @@ -6570,6 +6576,8 @@ public class API { REMOTE_FOLLOW, PIN, UNPIN, + REACT, + UNREACT, ENDORSE, UNENDORSE, SHOW_BOOST,