From b6e22b013a4b359b1dca826c31facd2e639dfc35 Mon Sep 17 00:00:00 2001 From: tom79 Date: Fri, 15 Nov 2019 16:42:10 +0100 Subject: [PATCH] Improve activity for bookmarks --- .../fedilab/android/client/PixelfedAPI.java | 44 ------------------- app/src/main/res/values/strings.xml | 1 + 2 files changed, 1 insertion(+), 44 deletions(-) diff --git a/app/src/main/java/app/fedilab/android/client/PixelfedAPI.java b/app/src/main/java/app/fedilab/android/client/PixelfedAPI.java index 4b7929d1d..f9297b900 100644 --- a/app/src/main/java/app/fedilab/android/client/PixelfedAPI.java +++ b/app/src/main/java/app/fedilab/android/client/PixelfedAPI.java @@ -270,51 +270,7 @@ public class PixelfedAPI { return pixelFedStoryItem; } - /** - * Retrieves Pixelfed Own Stories *synchronously* - * - * @return APIResponse - */ - public APIResponse getMyStories() { - try { - HttpsConnection httpsConnection = new HttpsConnection(context, this.instance); - String response = httpsConnection.get(getAbsoluteUrl("/me"), 10, null, prefKeyOauthTokenT); - apiResponse.setSince_id(httpsConnection.getSince_id()); - apiResponse.setMax_id(httpsConnection.getMax_id()); - pixelFedStory = parseStory(new JSONObject(response)); - } catch (HttpsConnection.HttpsConnectionException e) { - setError(e.getStatusCode(), e); - } catch (NoSuchAlgorithmException | IOException | KeyManagementException | JSONException e) { - e.printStackTrace(); - } - if (apiResponse == null) - apiResponse = new APIResponse(); - apiResponse.setPixelFedStory(pixelFedStory); - return apiResponse; - } - - /** - * Delete a Pixelfed Story *synchronously* - * - * @return APIResponse - */ - public int deleteStory(String id) { - - HashMap params = new HashMap<>(); - params.put("id", id); - HttpsConnection httpsConnection; - try { - httpsConnection = new HttpsConnection(context, this.instance); - httpsConnection.delete(getAbsoluteUrl("/delete"), 10, params, prefKeyOauthTokenT); - actionCode = httpsConnection.getActionCode(); - } catch (HttpsConnection.HttpsConnectionException e) { - setError(e.getStatusCode(), e); - } catch (NoSuchAlgorithmException | IOException | KeyManagementException e) { - e.printStackTrace(); - } - return actionCode; - } /** * Set the error message diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 4946c5e3c..95ef7bb12 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -86,6 +86,7 @@ Live notifications No toot to display + No stories to display Boosted by %1$s