Fix reorder

This commit is contained in:
tom79 2019-12-17 18:25:37 +01:00
parent 1668e2da5d
commit 957555c40b
2 changed files with 5 additions and 0 deletions

View File

@ -432,6 +432,7 @@ public class ReorderTimelinesActivity extends BaseActivity implements OnStartDra
super.onStop();
if (updated) {
Intent intent = new Intent(getBaseContext(), MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtra(Helper.INTENT_ACTION, Helper.REFRESH_TIMELINE);
intent.putExtra(Helper.REFRESH_LIST_TIMELINE, refresh_list);
startActivity(intent);

View File

@ -3258,6 +3258,10 @@ public class API {
try {
HttpsConnection httpsConnection = new HttpsConnection(context, this.instance);
String response = httpsConnection.get("https://" + instance + "/api/v1/videos", 10, params, null);
if( response == null) {
apiResponse.setPeertubes(peertubes);
return apiResponse;
}
JSONObject jsonObject = new JSONObject(response);
if( jsonObject.has("data")) {
JSONArray jsonArray = new JSONObject(response).getJSONArray("data");