Prepare release 2.30.0

This commit is contained in:
tom79 2020-02-08 18:02:50 +01:00
parent cbf9696088
commit 8b816b5a70
1 changed files with 23 additions and 15 deletions

View File

@ -4377,6 +4377,12 @@ public class API {
case UNPIN: case UNPIN:
action = String.format("/statuses/%s/unpin", targetedId); action = String.format("/statuses/%s/unpin", targetedId);
break; 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: case ENDORSE:
action = String.format("/accounts/%s/pin", targetedId); action = String.format("/accounts/%s/pin", targetedId);
break; break;
@ -5894,21 +5900,21 @@ public class API {
private Trends parseTrends(JSONObject resobj) { private Trends parseTrends(JSONObject resobj) {
Trends trend = new Trends(); Trends trend = new Trends();
try { try {
trend.setName(resobj.getString("name")); trend.setName(resobj.getString("name"));
trend.setUrl(resobj.getString("url")); trend.setUrl(resobj.getString("url"));
List<TrendsHistory> historyList = new ArrayList<>(); List<TrendsHistory> historyList = new ArrayList<>();
if( resobj.has("history")) { if( resobj.has("history")) {
JSONArray histories = resobj.getJSONArray("history"); JSONArray histories = resobj.getJSONArray("history");
for(int i = 0 ; i < histories.length() ; i++ ) { for(int i = 0 ; i < histories.length() ; i++ ) {
JSONObject hystory = histories.getJSONObject(i); JSONObject hystory = histories.getJSONObject(i);
TrendsHistory trendsHistory = new TrendsHistory(); TrendsHistory trendsHistory = new TrendsHistory();
trendsHistory.setDays(hystory.getLong("day")); trendsHistory.setDays(hystory.getLong("day"));
trendsHistory.setUses(hystory.getInt("uses")); trendsHistory.setUses(hystory.getInt("uses"));
trendsHistory.setAccounts(hystory.getInt("accounts")); trendsHistory.setAccounts(hystory.getInt("accounts"));
historyList.add(trendsHistory); historyList.add(trendsHistory);
} }
} }
trend.setTrendsHistory(historyList); trend.setTrendsHistory(historyList);
} catch (JSONException ignored) { } catch (JSONException ignored) {
} }
return trend; return trend;
@ -6570,6 +6576,8 @@ public class API {
REMOTE_FOLLOW, REMOTE_FOLLOW,
PIN, PIN,
UNPIN, UNPIN,
REACT,
UNREACT,
ENDORSE, ENDORSE,
UNENDORSE, UNENDORSE,
SHOW_BOOST, SHOW_BOOST,