From 0f38b26710286f1df713386986b89e64d928572d Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Thu, 11 Jan 2024 20:59:43 -0500 Subject: Remove see removed posts and comments. --- .../activities/ViewPostDetailActivity.java | 9 -- .../adapters/CommentsRecyclerViewAdapter.java | 18 --- .../CommentMoreBottomSheetFragment.java | 14 -- .../comment/FetchRemovedComment.java | 131 ----------------- .../comment/FetchRemovedCommentReveddit.java | 78 ---------- .../fragments/ViewPostDetailFragment.java | 65 --------- .../infinityforreddit/post/FetchRemovedPost.java | 159 --------------------- .../layout/fragment_comment_more_bottom_sheet.xml | 20 --- .../main/res/menu/view_post_detail_fragment.xml | 11 +- app/src/main/res/values-cs/strings.xml | 6 - app/src/main/res/values-de/strings.xml | 6 - app/src/main/res/values-el/strings.xml | 6 - app/src/main/res/values-es/strings.xml | 6 - app/src/main/res/values-fr/strings.xml | 6 - app/src/main/res/values-hi/strings.xml | 6 - app/src/main/res/values-hr/strings.xml | 6 - app/src/main/res/values-hu/strings.xml | 6 - app/src/main/res/values-it/strings.xml | 6 - app/src/main/res/values-ja/strings.xml | 6 - app/src/main/res/values-ko/strings.xml | 6 - app/src/main/res/values-nl/strings.xml | 6 - app/src/main/res/values-pl/strings.xml | 6 - app/src/main/res/values-pt-rBR/strings.xml | 6 - app/src/main/res/values-pt/strings.xml | 6 - app/src/main/res/values-ro/strings.xml | 6 - app/src/main/res/values-ru/strings.xml | 6 - app/src/main/res/values-ta/strings.xml | 6 - app/src/main/res/values-tr-rTR/strings.xml | 6 - app/src/main/res/values-uk/strings.xml | 6 - app/src/main/res/values-vi/strings.xml | 6 - app/src/main/res/values-zh-rCN/strings.xml | 6 - app/src/main/res/values/strings.xml | 6 - 32 files changed, 2 insertions(+), 641 deletions(-) delete mode 100644 app/src/main/java/ml/docilealligator/infinityforreddit/comment/FetchRemovedComment.java delete mode 100644 app/src/main/java/ml/docilealligator/infinityforreddit/comment/FetchRemovedCommentReveddit.java delete mode 100644 app/src/main/java/ml/docilealligator/infinityforreddit/post/FetchRemovedPost.java (limited to 'app/src/main') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPostDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPostDetailActivity.java index 1d0919d4..9bf59eac 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPostDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPostDetailActivity.java @@ -428,15 +428,6 @@ public class ViewPostDetailActivity extends BaseActivity implements SortTypeSele } } - public void showRemovedComment(Comment comment, int position) { - if (sectionsPagerAdapter != null) { - ViewPostDetailFragment fragment = sectionsPagerAdapter.getCurrentFragment(); - if (fragment != null) { - fragment.showRemovedComment(comment, position); - } - } - } - public void saveComment(@NonNull Comment comment, int position) { if (comment.isSaved()) { comment.setSaved(false); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java index 4978bdbd..53bb5d57 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java @@ -1038,24 +1038,6 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter= mVisibleComments.size() || !mVisibleComments.get(position).equals(originalComment)) { - position = mVisibleComments.indexOf(originalComment); - if (position < 0) { - Toast.makeText(mActivity, R.string.show_removed_comment_failed, Toast.LENGTH_SHORT).show(); - return; - } - } - mVisibleComments.get(position).setSubmittedByAuthor(originalComment.isSubmitter()); - mVisibleComments.get(position).setCommentMarkdown(fetchedComment.getCommentMarkdown()); - - if (mIsSingleCommentThreadMode) { - notifyItemChanged(position + 1); - } else { - notifyItemChanged(position); - } - } - public void deleteComment(int position) { if (mVisibleComments != null && position >= 0 && position < mVisibleComments.size()) { if (mVisibleComments.get(position).hasReply()) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CommentMoreBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CommentMoreBottomSheetFragment.java index 59345840..bd8b992f 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CommentMoreBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CommentMoreBottomSheetFragment.java @@ -171,20 +171,6 @@ public class CommentMoreBottomSheetFragment extends LandscapeExpandedRoundedBott dismiss(); }); - if ("[deleted]".equals(comment.getAuthor()) || - "[deleted]".equals(comment.getCommentRawText()) || - "[removed]".equals(comment.getCommentRawText()) - ) { - binding.seeRemovedViewCommentMoreBottomSheetFragment.setVisibility(View.VISIBLE); - - binding.seeRemovedViewCommentMoreBottomSheetFragment.setOnClickListener(view -> { - dismiss(); - if (activity instanceof ViewPostDetailActivity) { - ((ViewPostDetailActivity) activity).showRemovedComment(comment, bundle.getInt(EXTRA_POSITION)); - } - }); - } - binding.addToCommentFilterViewCommentMoreBottomSheetFragment.setOnClickListener(view -> { Intent intent = new Intent(activity, CommentFilterPreferenceActivity.class); intent.putExtra(CommentFilterPreferenceActivity.EXTRA_COMMENT, comment); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/comment/FetchRemovedComment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/comment/FetchRemovedComment.java deleted file mode 100644 index 24ab8d54..00000000 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/comment/FetchRemovedComment.java +++ /dev/null @@ -1,131 +0,0 @@ -package ml.docilealligator.infinityforreddit.comment; - -import android.os.Handler; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -import java.io.IOException; -import java.util.concurrent.Executor; - -import ml.docilealligator.infinityforreddit.apis.PushshiftAPI; -import ml.docilealligator.infinityforreddit.utils.JSONUtils; -import ml.docilealligator.infinityforreddit.utils.Utils; -import retrofit2.Response; -import retrofit2.Retrofit; - -public class FetchRemovedComment { - - public static void fetchRemovedComment(Executor executor, Handler handler, Retrofit retrofit, Comment comment, - FetchRemovedCommentListener listener) { - executor.execute(() -> { - try { - Response response = retrofit.create(PushshiftAPI.class).getRemovedComment(comment.getId()).execute(); - if (response.isSuccessful()) { - Comment removedComment = parseComment(response.body(), comment); - handler.post(() -> { - if (removedComment != null) { - listener.fetchSuccess(removedComment, comment); - } else { - listener.fetchFailed(); - } - }); - } else { - handler.post(listener::fetchFailed); - } - } catch (IOException e) { - e.printStackTrace(); - handler.post(listener::fetchFailed); - } - }); - } - - // At the moment of writing this code, directly fetching a removed comment from - // Pushift.io API returns an Internal Server Error, so we temporarily do it this way instead. - // If this fails to return the removed comment, we try our luck with Reveddit API - public static void searchRemovedComment(Executor executor, Handler handler, Retrofit retrofit, Comment comment, - FetchRemovedCommentListener listener) { - executor.execute(() -> { - long after = (comment.getCommentTimeMillis() / 1000) - 1; // 1 second before comment creation epoch - try { - Response response = retrofit.create(PushshiftAPI.class).searchComments( - comment.getLinkId(), - 1000, - "id", - "id,author,body,is_submitter", - after, - after + 43200, // 12 Hours later - "*").execute(); - if (response.isSuccessful()) { - Comment removedComment = parseComment(response.body(), comment); - handler.post(() -> { - if (removedComment != null) { - listener.fetchSuccess(removedComment, comment); - } else { - listener.fetchFailed(); - } - }); - } else { - handler.post(listener::fetchFailed); - } - } catch (IOException e) { - e.printStackTrace(); - handler.post(listener::fetchFailed); - } - }); - } - - @Nullable - private static Comment parseComment(String responseBody, Comment comment) { - try { - JSONArray commentJSONArray = new JSONObject(responseBody).getJSONArray(JSONUtils.DATA_KEY); - JSONObject commentFound = null; - for (int i = 0; i < commentJSONArray.length(); i++) { - JSONObject commentJSON = commentJSONArray.getJSONObject(i); - if (!commentJSON.isNull("id") && commentJSON.getString("id").equals(comment.getId())) { - commentFound = commentJSON; - break; - } - } - if (commentFound == null) { - return null; - } - - return parseRemovedComment(commentFound, comment); - } catch (JSONException e) { - e.printStackTrace(); - return null; - } - } - - @Nullable - private static Comment parseRemovedComment(@NonNull JSONObject result, Comment comment) throws JSONException { - String id = result.getString(JSONUtils.ID_KEY); - String author = result.getString(JSONUtils.AUTHOR_KEY); - String body = Utils.modifyMarkdown(Utils.trimTrailingWhitespace(result.optString(JSONUtils.BODY_KEY))); - boolean isSubmitter = result.getBoolean(JSONUtils.IS_SUBMITTER_KEY); - - if (id.equals(comment.getId()) && - (!author.equals(comment.getAuthor()) || - !body.equals(comment.getCommentRawText())) - ) { - comment.setAuthor(author); - comment.setCommentMarkdown(body); - comment.setCommentRawText(body); - comment.setSubmittedByAuthor(isSubmitter); - return comment; - } else { - return null; - } - } - - public interface FetchRemovedCommentListener { - void fetchSuccess(Comment fetchedComment, Comment originalComment); - - void fetchFailed(); - } -} diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/comment/FetchRemovedCommentReveddit.java b/app/src/main/java/ml/docilealligator/infinityforreddit/comment/FetchRemovedCommentReveddit.java deleted file mode 100644 index ec7beea8..00000000 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/comment/FetchRemovedCommentReveddit.java +++ /dev/null @@ -1,78 +0,0 @@ -package ml.docilealligator.infinityforreddit.comment; - -import android.os.Handler; - -import org.json.JSONException; -import org.json.JSONObject; - -import java.io.IOException; -import java.util.concurrent.Executor; - -import ml.docilealligator.infinityforreddit.apis.RevedditAPI; -import ml.docilealligator.infinityforreddit.utils.APIUtils; -import ml.docilealligator.infinityforreddit.utils.JSONUtils; -import ml.docilealligator.infinityforreddit.utils.Utils; -import retrofit2.Response; -import retrofit2.Retrofit; - -public class FetchRemovedCommentReveddit { - - public static void fetchRemovedComment(Executor executor, Handler handler, Retrofit retrofit, Comment comment, - long postCreatedUtc, int nComments, FetchRemovedCommentListener listener) { - executor.execute(() -> { - String parentIdWithoutPrefix = comment.getParentId().substring(3); - String rootCommentId = parentIdWithoutPrefix.equals(comment.getLinkId()) ? comment.getId() : parentIdWithoutPrefix; - try { - Response response = retrofit.create(RevedditAPI.class).getRemovedComments( - APIUtils.getRevedditHeader(), - comment.getLinkId(), - (comment.getCommentTimeMillis() / 1000) - 1, - rootCommentId, - comment.getId(), - nComments, - postCreatedUtc / 1000, - true).execute(); - if (response.isSuccessful()) { - Comment removedComment = parseRemovedComment(new JSONObject(response.body()).getJSONObject(comment.getId()), comment); - handler.post(() -> { - if (removedComment != null) { - listener.fetchSuccess(removedComment, comment); - } else { - listener.fetchFailed(); - } - }); - } else { - handler.post(listener::fetchFailed); - } - } catch (IOException | JSONException e) { - e.printStackTrace(); - handler.post(listener::fetchFailed); - } - }); - } - - private static Comment parseRemovedComment(JSONObject result, Comment comment) throws JSONException { - String id = result.getString(JSONUtils.ID_KEY); - String author = result.getString(JSONUtils.AUTHOR_KEY); - String body = Utils.modifyMarkdown(Utils.trimTrailingWhitespace(result.optString(JSONUtils.BODY_KEY))); - - if (id.equals(comment.getId()) && (!author.equals(comment.getAuthor()) || !body.equals(comment.getCommentRawText()))) { - comment.setAuthor(author); - comment.setCommentMarkdown(body); - comment.setCommentRawText(body); - if (result.has(JSONUtils.IS_SUBMITTER_KEY)) { - // This doesn't seem to be present for the Reveddit API anymore... - comment.setSubmittedByAuthor(result.getBoolean(JSONUtils.IS_SUBMITTER_KEY)); - } - return comment; - } else { - return null; - } - } - - public interface FetchRemovedCommentListener { - void fetchSuccess(Comment fetchedComment, Comment originalComment); - - void fetchFailed(); - } -} diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java index 249364f0..4a712ee0 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java @@ -91,8 +91,6 @@ import ml.docilealligator.infinityforreddit.bottomsheetfragments.FlairBottomShee import ml.docilealligator.infinityforreddit.bottomsheetfragments.PostCommentSortTypeBottomSheetFragment; import ml.docilealligator.infinityforreddit.comment.Comment; import ml.docilealligator.infinityforreddit.comment.FetchComment; -import ml.docilealligator.infinityforreddit.comment.FetchRemovedComment; -import ml.docilealligator.infinityforreddit.comment.FetchRemovedCommentReveddit; import ml.docilealligator.infinityforreddit.comment.ParseComment; import ml.docilealligator.infinityforreddit.commentfilter.CommentFilter; import ml.docilealligator.infinityforreddit.commentfilter.FetchCommentFilter; @@ -107,7 +105,6 @@ import ml.docilealligator.infinityforreddit.events.PostUpdateEventToPostDetailFr import ml.docilealligator.infinityforreddit.events.PostUpdateEventToPostList; import ml.docilealligator.infinityforreddit.message.ReadMessage; import ml.docilealligator.infinityforreddit.post.FetchPost; -import ml.docilealligator.infinityforreddit.post.FetchRemovedPost; import ml.docilealligator.infinityforreddit.post.HidePost; import ml.docilealligator.infinityforreddit.post.ParsePost; import ml.docilealligator.infinityforreddit.post.Post; @@ -726,13 +723,6 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic } mMenu.findItem(R.id.action_view_crosspost_parent_view_post_detail_fragment).setVisible(mPost.getCrosspostParentId() != null); - - if ("[deleted]".equals(mPost.getAuthor()) || - "[deleted]".equals(mPost.getSelfText()) || - "[removed]".equals(mPost.getSelfText()) - ) { - mMenu.findItem(R.id.action_see_removed_view_post_detail_fragment).setVisible(true); - } } } @@ -1138,9 +1128,6 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic intent.putExtra(ReportActivity.EXTRA_THING_FULLNAME, mPost.getFullName()); startActivity(intent); return true; - } else if (itemId == R.id.action_see_removed_view_post_detail_fragment) { - showRemovedPost(); - return true; } else if (itemId == R.id.action_crosspost_view_post_detail_fragment) { Intent submitCrosspostIntent = new Intent(activity, SubmitCrosspostActivity.class); submitCrosspostIntent.putExtra(SubmitCrosspostActivity.EXTRA_POST, mPost); @@ -1821,36 +1808,6 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic .show(); } - public void showRemovedComment(Comment comment, int position) { - Toast.makeText(activity, R.string.fetching_removed_comment, Toast.LENGTH_SHORT).show(); - FetchRemovedComment.fetchRemovedComment( - mExecutor, new Handler(), pushshiftRetrofit, comment, - new FetchRemovedComment.FetchRemovedCommentListener() { - @Override - public void fetchSuccess(Comment fetchedComment, Comment originalComment) { - mCommentsAdapter.editComment(fetchedComment, originalComment, position); - } - - @Override - public void fetchFailed() { - // Reveddit fallback - FetchRemovedCommentReveddit.fetchRemovedComment(mExecutor, new Handler(), revedditRetrofit, - comment, mPost.getPostTimeMillis(), mPost.getNComments(), - new FetchRemovedCommentReveddit.FetchRemovedCommentListener() { - @Override - public void fetchSuccess(Comment fetchedComment, Comment originalComment) { - mCommentsAdapter.editComment(fetchedComment, originalComment, position); - } - - @Override - public void fetchFailed() { - Toast.makeText(activity, R.string.show_removed_comment_failed, Toast.LENGTH_SHORT).show(); - } - }); - } - }); - } - public void changeToNormalThreadMode() { isSingleCommentThreadMode = false; mSingleCommentId = null; @@ -1892,28 +1849,6 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic TransitionManager.beginDelayedTransition((mCommentsRecyclerView == null ? mRecyclerView : mCommentsRecyclerView), new AutoTransition()); } - public void showRemovedPost() { - Toast.makeText(activity, R.string.fetching_removed_post, Toast.LENGTH_SHORT).show(); - FetchRemovedPost.fetchRemovedPost( - pushshiftRetrofit, - mPost, - new FetchRemovedPost.FetchRemovedPostListener() { - @Override - public void fetchSuccess(Post post) { - mPost = post; - tryMarkingPostAsRead(); - if (mPostAdapter != null) { - mPostAdapter.updatePost(post); - } - } - - @Override - public void fetchFailed() { - Toast.makeText(activity, R.string.show_removed_post_failed, Toast.LENGTH_SHORT).show(); - } - }); - } - public boolean getIsNsfwSubreddit() { if (activity != null) { return activity.isNsfwSubreddit(); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/post/FetchRemovedPost.java b/app/src/main/java/ml/docilealligator/infinityforreddit/post/FetchRemovedPost.java deleted file mode 100644 index 5d815e83..00000000 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/post/FetchRemovedPost.java +++ /dev/null @@ -1,159 +0,0 @@ -package ml.docilealligator.infinityforreddit.post; - -import android.net.Uri; -import android.os.AsyncTask; -import android.text.Html; - -import androidx.annotation.NonNull; - -import org.json.JSONException; -import org.json.JSONObject; - -import java.util.ArrayList; - -import ml.docilealligator.infinityforreddit.apis.PushshiftAPI; -import ml.docilealligator.infinityforreddit.utils.JSONUtils; -import ml.docilealligator.infinityforreddit.utils.Utils; -import retrofit2.Call; -import retrofit2.Callback; -import retrofit2.Response; -import retrofit2.Retrofit; - -public class FetchRemovedPost { - - public static void fetchRemovedPost(Retrofit retrofit, Post post, FetchRemovedPostListener listener) { - retrofit.create(PushshiftAPI.class).getRemovedPost(post.getId()) - .enqueue(new Callback() { - @Override - public void onResponse(@NonNull Call call, @NonNull Response response) { - if (response.isSuccessful()) { - new ParsePostAsyncTask(response.body(), post, listener).execute(); - } else { - listener.fetchFailed(); - } - } - - @Override - public void onFailure(@NonNull Call call, @NonNull Throwable t) { - t.printStackTrace(); - listener.fetchFailed(); - } - }); - } - - private static Post parseRemovedPost(JSONObject result, Post post) throws JSONException { - String id = result.getString(JSONUtils.ID_KEY); - String author = result.getString(JSONUtils.AUTHOR_KEY); - String title = result.getString(JSONUtils.TITLE_KEY); - String body = Utils.modifyMarkdown(Utils.trimTrailingWhitespace(result.getString(JSONUtils.SELFTEXT_KEY))); - - if ( id.equals(post.getId()) && - (!author.equals(post.getAuthor()) || - foundSelfText(post.getSelfText(), body)) - ) { - post.setAuthor(author); - post.setTitle(title); - post.setSelfText(body); - post.setSelfTextPlain(""); - post.setSelfTextPlainTrimmed(""); - - String url = result.optString(JSONUtils.URL_KEY); - - if (url.endsWith("gif") || url.endsWith("mp4")) { - post.setVideoUrl(url); - post.setVideoDownloadUrl(url); - } else if (post.getPostType() == Post.VIDEO_TYPE || post.getPostType() == Post.GIF_TYPE) { - JSONObject redditVideoObject = result.getJSONObject("secure_media").getJSONObject(JSONUtils.REDDIT_VIDEO_KEY); - String videoUrl = Html.fromHtml(redditVideoObject.getString(JSONUtils.HLS_URL_KEY)).toString(); - String videoDownloadUrl = redditVideoObject.getString(JSONUtils.FALLBACK_URL_KEY); - - post.setVideoUrl(videoUrl); - post.setVideoDownloadUrl(videoDownloadUrl); - } else if (post.getPostType() == Post.LINK_TYPE) { - post.setUrl(url); - } - - if (post.getPostType() == Post.VIDEO_TYPE) { - try { - Uri uri = Uri.parse(url); - String authority = uri.getAuthority(); - if (authority != null && authority.contains("redgifs.com")) { - post.setPostType(Post.LINK_TYPE); - post.setUrl(url); - } - } catch (IllegalArgumentException ignore) { - } - } - - if (!result.isNull("thumbnail")) { - ArrayList previews = post.getPreviews(); - if (previews != null && !previews.isEmpty()) { - if (previews.size() >= 2) { - Post.Preview preview = previews.get(1); - preview.setPreviewUrl(result.getString("thumbnail")); - previews.set(1, preview); - } else { - Post.Preview preview = previews.get(0); - preview.setPreviewUrl(result.getString("thumbnail")); - previews.set(0, preview); - } - } else { - Post.Preview preview = new Post.Preview(result.getString("thumbnail"), 1, 1, "", ""); - preview.setPreviewUrl(result.getString("thumbnail")); - ArrayList newPreviews = new ArrayList<>(); - newPreviews.add(preview); - post.setPreviews(newPreviews); - } - } - - return post; - } else { - return null; - } - } - - private static boolean foundSelfText(String oldText, String newText) { - return !(newText.equals("[deleted]") || newText.equals("[removed]")) && - !newText.equals(oldText); - } - - public interface FetchRemovedPostListener { - void fetchSuccess(Post post); - - void fetchFailed(); - } - - private static class ParsePostAsyncTask extends AsyncTask { - - private final String responseBody; - private final FetchRemovedPostListener listener; - Post post; - - public ParsePostAsyncTask(String responseBody, Post post, FetchRemovedPostListener listener) { - this.responseBody = responseBody; - this.post = post; - this.listener = listener; - } - - @Override - protected Void doInBackground(Void... voids) { - try { - JSONObject postJson = new JSONObject(responseBody).getJSONArray(JSONUtils.DATA_KEY).getJSONObject(0); - post = parseRemovedPost(postJson, post); - } catch (JSONException e) { - e.printStackTrace(); - post = null; - } - return null; - } - - @Override - protected void onPostExecute(Void aVoid) { - super.onPostExecute(aVoid); - if (post != null) - listener.fetchSuccess(post); - else - listener.fetchFailed(); - } - } -} diff --git a/app/src/main/res/layout/fragment_comment_more_bottom_sheet.xml b/app/src/main/res/layout/fragment_comment_more_bottom_sheet.xml index 2aedd340..6d233edc 100644 --- a/app/src/main/res/layout/fragment_comment_more_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_comment_more_bottom_sheet.xml @@ -143,26 +143,6 @@ android:fontFamily="?attr/font_family" app:drawableStartCompat="@drawable/ic_report_24dp" /> - - - - diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index ffaa1c1f..a4e58e8b 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -68,7 +68,6 @@ "Sdílet" "Náhled" "Nahlásit" - "Zobrazit odebrané" "Nastavit jako pozadí" "Poslat soukromou zprávu" "Při parsování JSON odpovědi se vyskytla chyba" @@ -274,11 +273,6 @@ "Opravdu?" "Upravit" "Odstranit" - "Zobrazit odstraněný komentář" - "Získávání odstraněného komentáře" - "Nepodařilo se nalézt odstraněný komentář" - "Získávání odstraněného příspěvku" - "Nepodařilo se nalézt odstraněný příspěvek" "Zrušit" "OK" "Úspěšně upraveno" diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 6892bb5f..1ea7625f 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -70,7 +70,6 @@ "Teilen" "Vorschau" "Melden" - "Entfernten Beitrag ansehen" "Als Hintergrundbild einstellen" "Private Nachricht senden" "Ein Fehler trat beim Abruf der JSON-Antwort auf" @@ -268,11 +267,6 @@ Tippen für Neuversuch." "Bist du sicher?" "Bearbeiten" "Löschen" - "Entfernten Kommentar ansehen" - "Rufe entfernten Kommentar ab" - "Konnte den entfernten Kommentar nicht finden" - "Rufe entfernten Beitrag ab" - "Konnte den entfernten Beitrag nicht finden" "Abbrechen" "OK" "Bearbeiten erfolgreich" diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 54aefad0..448886e5 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -58,7 +58,6 @@ "Κοινή χρήση" "Προεπισκόπηση" "Αναφορά" - "Προβολή διαγραμμένου" "Ορισμός ως ταπετσαρία" "Αποστολή προσωπικού μηνύματος" "Σφάλμα κατά την ανάλυση της απόκρισης JSON" @@ -243,11 +242,6 @@ "Είστε σίγουρος/η?" "Επεξεργασία" "Διαγραφή" - "Δες το διαγραμμένο σχόλιο" - "Λήψη διαγραμμένου σχολίου" - "Δεν μπόρεσε να βρεθεί το διαγραμμένο σχόλιο" - "Λήψη διαγραμμένης ανάρτησης" - "Δεν μπόρεσε να βρεθεί η διαγραμμένη ανάρτηση" "Άκυρο" "ΟΚ" "Επιτυχής επεξεργασία" diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index a6dc7fd4..0ce96613 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -70,7 +70,6 @@ "Compartir" "Previsualizar" "Reportar" - "Ver eliminados" "Definir como fondo de pantalla" "Enviar mensaje privado" "No fue posible procesar la respuesta JSON" @@ -282,11 +281,6 @@ Toca para reintentar." "¿Estás seguro?" "Editar" "Borrar" - "Ver comentario eliminado" - "Obteniendo el comentario" - "No se encontró el comentario eliminado" - "Obteniendo la publicación eliminada" - "No se encontró la publicación eliminada" "Cancelar" "OK" diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 01bb0391..3b34a2e1 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -81,7 +81,6 @@ "Partager" "Prévisualiser" "Reporter" - "Afficher les publications supprimées" "Définir comme fond d'écran" "Envoyer le message privé" "Une erreur s'est produite lors de l'analyse de la réponse JSON" @@ -294,13 +293,8 @@ Appuyez pour réessayer." "Êtes-vous sûr ?" "Éditer" "Supprimer" - "Voir le commentaire supprimé" - "Récupération du commentaire supprimé" - "Impossible de trouver le commentaire supprimé" - "Récupération de la publication supprimée" - "Impossible de trouver la publication supprimée" "Annuler" "OK" diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index 3a6313a1..55b2e2a2 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -74,7 +74,6 @@ "दूसरो को भेजे" "पूर्वदर्शन" "शिकायत करें" - "हटाए हुए पोस्ट देखें" "वालपेपर लगाएं " "व्यक्तिगत संदेश भेजें" "JSON प्रतिक्रिया को समझने में त्रुटि" @@ -297,11 +296,6 @@ Behavior --> "क्या आप सुनिश्चित हैं? " "संपादन करें " "हटाएं " - "हटाई हुई टिप्पणी देखें " - "हटाई हुई टिप्पणी प्राप्त हो रही है " - "हटाई हुई टिप्पणी नहीं खोज सका " - "हटाई हुई पोस्ट प्राप्त हो रही है " - "हटाई हुई पोस्ट नहीं खोजी जा सकी" "निरस्त करें " "ठीक है " diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index acf0c68f..a18123d5 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -72,7 +72,6 @@ "Podijeli" "Pregledaj" "Prijavi" - "Vidi uklonjeno" "Postavi kao pozadinu zaslona" "Pošalji privatnu poruku" "Došlo je do pogreške prilikom raščlanjivanja JSON odgovora" @@ -272,11 +271,6 @@ "Jeste li sigurni?" "Uredi" "Obriši" - "Vidi uklonjeni komentar" - "Dohvaćanje uklonjenog komentara" - "Nismo uspjeli pronaći uklonjeni komentar" - "Dohvaćanje uklonjene objave" - "Nismo uspjeli pronaći uklonjenu objavu" "Otkaži" "U redu" diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index 11b01b33..d15d71d3 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -58,7 +58,6 @@ "Megosztás" "Előnézet" "Bejelentés" - "Eltávolítottak megtekintése" "Beállítás háttérképként" "Privát üzenet küldése" "Hiba történt a JSON válasz feldolgozása során" @@ -246,11 +245,6 @@ "Biztos?" "Szerkesztés" "Törlés" - "Az eltávolított hozzászólás megtekintése" - "Az eltávolított hozzászólás lekérése" - "Nem lehet megtalálni az eltávolított hozzászólást" - "Eltávolított bejegyzés lekérése" - "Az eltávolított bejegyzés nem található" "Mégse" "OK" "A szerkesztés sikeres" diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 550f7843..6b502b83 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -58,7 +58,6 @@ "Condividi" "Anteprima" "Segnala" - "Visualizza Rimosso" "Imposta come sfondo del dispositivo" "Invia Messaggio privato" "Si è verificato un errore durante l'analisi della risposta JSON" @@ -250,11 +249,6 @@ Tocca per riprovare." "Sei sicuro?" "Modifica" "Elimina" - "Visualizza commento rimosso" - "Recupero del commento rimosso" - "Impossibile trovare il commento rimosso" - "Recupero post rimosso" - "Impossibile trovare il post rimosso" "Cancella" "OK" "Modifica eseguita correttamente" diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 7f63c702..64106cf2 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -72,7 +72,6 @@ "共有" "プレビュー" "通報" - "削除済みを見る" "壁紙に設定" "個人メッセージを送信" "JSONの解析中にエラーが発生しました" @@ -298,11 +297,6 @@ "よろしいですか?" "編集" "削除" - "削除済みのコメントを表示" - "削除済みのコメントを取得中です" - "削除済みのコメントを取得できませんでした" - "削除済みの投稿を取得中です" - "削除済みの投稿を取得できませんでした" "キャンセル" "OK" diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index 784f132c..2743e087 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -68,7 +68,6 @@ "공유" "미리 보기" "신고" - "삭제된 항목 보기" "배경화면으로 설정" "개인 메시지 보내기" "JSON 답변을 파싱하는데 오류가 발생했습니다" @@ -274,11 +273,6 @@ "정말로 실행할까요?" "편집" "삭제" - "삭제된 댓글 보기" - "삭제된 댓글 가져오는 중" - "삭제된 댓글을 찾을 수 없습니다" - "삭제된 글 가져오는 중" - "삭제된 글을 찾을 수 없습니다" "취소" "확인" "성공적으로 편집" diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index e855da6a..a8de9df4 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -68,7 +68,6 @@ "Delen" "Voorvertoning" "Melden" - "Zie verwijderd" "Instellen als startschermachtergrond" "Privebericht versturen" "Er is een fout opgetreden bij het verwerken van het json-antwoord" @@ -271,11 +270,6 @@ Druk om opnieuw te proberen." "Weet je het zeker?" "Bewerken" "Verwijderen" - "Verwijderde reactie bekijken" - "Bezig met ophalen van verwijderde reactie…" - "De verwijderde reactie ontbreekt" - "Bezig met ophalen van verwijderd bericht…" - "Het verwijderde bericht ontbreekt" "Annuleren" "Oké" "Het bericht is bewerkt" diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index b8d074aa..1780f959 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -68,7 +68,6 @@ "Udostępnij" "Podgląd" "Zgłoś" - "Zobacz usunięte" "Ustaw jako tapetę" "Wyślij wiadomość prywatną" "Wystąpił błąd podczas analizy odpowiedzi JSON" @@ -263,11 +262,6 @@ Naciśnij, aby spróbować ponownie." "Jesteś pewien?" "Edytuj" "Usuń" - "Zobacz usunięty komentarz" - "Pobieranie usuniętego komentarza" - "Nie można znaleźć usuniętego komentarza" - "Pobieranie usuniętego posta" - "Nie można znaleźć usuniętego posta" "Anuluj" "OK" "Zedytowano pomyślnie" diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index f96cb25b..a0278fe9 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -70,7 +70,6 @@ "Compartilhar" "Prévia" "Reportar" - "Ver excluído" "Definir como papel de parede" "Enviar mensagem privada" "Erro ao analisar a resposta do JSON" @@ -266,11 +265,6 @@ Toque para tentar de novo." "Tem certeza?" "Editar" "Excluir" - "Ver comentário excluído" - "Buscando comentário excluído" - "Não pôde achar o comentário excluído" - "Buscando postagem excluída" - "Não pôde achar a postagem excluída" "Cancelar" "Ok" "Êxito ao editar" diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 52ca9422..21eb51aa 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -68,7 +68,6 @@ "Partilhar" "Pré-visualizar" "Denunciar" - "Ver Removido" "Definir como Imagem de Fundo" "Enviar Mensagem Privada" "Ocorreu um erro ao analisar a resposta do JSON" @@ -278,11 +277,6 @@ Toque para tentar novamente." "Tem a certeza?" "Editar" "Eliminar" - "Ver Comentário Removido" - "A obter comentário removido" - "Comentário removido não encontrado" - "A obter publicação removido" - "Publicação removida não encontrada" "Cancelar" "OK" diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index baf6b796..56d77f34 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -68,7 +68,6 @@ "Distribuire" "Previzualizare" "Raportați" - "Vedeți eliminate" "Setați ca fundal" "Trimiteți mesaj privat" "Eroare la afișarea răspunsului JSON" @@ -268,11 +267,6 @@ Apăsați pentru reîncărcare." "Sunteți sigur?" "Editare" "Ștergere" - "Vedeți comentariul șters" - "Se caută comentariul șters" - "Nu s-a găsit comentariul șters" - "Se caută postarea ștearsă" - "Nu s-a găsit postarea ștearsă" "Anulare" "OK" "Editare reușită" diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 5b90a82b..7b2f5d77 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -72,7 +72,6 @@ "Поделиться" "Предпросмотр" "Пожаловаться" - "Просмотр удалённого" "Установить как обои" "Отправить личное сообщение" "Произошла ошибка при анализе JSON-ответа" @@ -279,11 +278,6 @@ "Вы уверены?" "Изменить" "Удалить" - "Посмотреть удалённый комментарий" - "Получение удалённого комментария" - "Невозможно найти удалённый комментарий" - "Получение удалённого сообщения" - "Невозможно найти удалённую запись" "Отменить" "ОК" "Редактирование успешно" diff --git a/app/src/main/res/values-ta/strings.xml b/app/src/main/res/values-ta/strings.xml index 16dee245..1c2ff6ab 100644 --- a/app/src/main/res/values-ta/strings.xml +++ b/app/src/main/res/values-ta/strings.xml @@ -64,7 +64,6 @@ "பகிர்" "முன்னோட்டம்" "புகாரளி" - "நீக்கியவற்றைப் பார்" "சுவரொட்டியாக அமை" "தனித் தகவல் அனுப்பு" "JSON பதிலைக் கூறாக்கும்போது பிழை ஏற்பட்டது" @@ -259,11 +258,6 @@ "நீங்கள் உறுதியா?" "திருத்து" "அழி" - "நீக்கப்பட்ட கருத்தைப் பார்" - "நீக்கப்பட்ட கருத்தைப் பெறுகிறது" - "நீக்கப்பட்ட கருத்தைக் கண்டறிய முடியவில்லை" - "நீக்கப்பட்ட இடுகையைப் பெறுகிறது" - "நீக்கப்பட்ட இடுகையைப் பெற முடியவில்லை" "ரத்துசெய்" "சரி" "திருத்தம் வெற்றி" diff --git a/app/src/main/res/values-tr-rTR/strings.xml b/app/src/main/res/values-tr-rTR/strings.xml index 088f20ab..798f5071 100644 --- a/app/src/main/res/values-tr-rTR/strings.xml +++ b/app/src/main/res/values-tr-rTR/strings.xml @@ -68,7 +68,6 @@ "Paylaş" "Önizleme" "Bildir" - "Kaldırılanları Göster" "Duvar Kağıdı Yap" "Özel Mesaj Gönder" "JSON yanıtı ayrıştırılırken hata oluştu" @@ -269,11 +268,6 @@ Tekrar denemek için tıklayın." "Emin misiniz?" "Düzenle" "Sil" - "Kaldırılan Yorumu Gör" - "Kaldırılan yorum getiriliyor" - "Kaldırılan yorum bulunamadı" - "Kaldırılan gönderi getiriliyor" - "Kaldırılan gönderi bulunamadı" "İptal" "Tamam" "Başarıyla düzenlendi" diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 9b8ee409..8b5773a6 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -68,7 +68,6 @@ "Поширити" "Перегляд" "Повідомити" - "Переглянути вилучені" "Зробити шпалерами" "Надіслати приватне повідомлення" "Помилка відбулася під час аналізу відповіді JSON" @@ -270,11 +269,6 @@ "Ви впевнені?" "Змінити" "Видалити" - "Показати вилучений коментар" - "Отримати вилучений коментар" - "Не вдалося знайти вилучений коментар" - "Отримати вилучений допис" - "Не вдалося знайти вилучений допис" "Скасувати" "Гаразд" "Успішно змінено" diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index 3236a559..8b8bd8d4 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -68,7 +68,6 @@ "Chia sẻ" "Xem trước" "Báo cáo" - "Xem bài đăng đã bị xóa" "Đặt làm hình nền" "Gửi tin nhắn riêng tư" "Lỗi khi phân tích phản hồi JSON" @@ -271,11 +270,6 @@ Nhấn để thử lại." "Bạn có chắc không?" "Sửa" "Xóa" - "Xem bình luận bị xóa" - "Đang tìm bình luận bị xóa" - "Không thể tìm được bình luận bị xóa" - "Đang tìm bài đăng bị xóa" - "Không thể tìm được bài đăng bị xóa" "Hủy" "OK" diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index a1243303..b433a0a0 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -64,7 +64,6 @@ "分享" "预览" "举报" - "查看已删除" "设为壁纸" "发送私信" "解析 JSON 响应错误" @@ -272,11 +271,6 @@ "确定吗?" "编辑" "删除" - "查看已删除的评论" - "正在获取已删除的评论" - "无法找到已删除的评论" - "正在获取已删除的帖子" - "无法找到已删除的帖子" "取消" "确定" "编辑成功" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 542929a3..aa5a36b4 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -78,7 +78,6 @@ Share Preview Report - See Removed Crosspost Set as Wallpaper Send Private Message @@ -332,11 +331,6 @@ Are you sure? Edit Delete - See Removed Comment - Fetching removed comment - Could not find the removed comment - Fetching removed post - Could not find the removed post Cancel OK Edit successfully -- cgit v1.2.3