diff options
author | Docile-Alligator <chineseperson5@gmail.com> | 2022-04-02 14:41:10 +0000 |
---|---|---|
committer | Docile-Alligator <chineseperson5@gmail.com> | 2022-04-02 14:41:10 +0000 |
commit | 8c8dc45f190ac14a71f9210cf2b4db295f7f951b (patch) | |
tree | ed5f47ef99fd06490871419749d278aa166b7a63 /app/src/main/java | |
parent | d7fcb66cda6e21fae3c5275097591919c18f63d4 (diff) | |
download | infinity-for-reddit-8c8dc45f190ac14a71f9210cf2b4db295f7f951b.tar infinity-for-reddit-8c8dc45f190ac14a71f9210cf2b4db295f7f951b.tar.gz infinity-for-reddit-8c8dc45f190ac14a71f9210cf2b4db295f7f951b.tar.bz2 infinity-for-reddit-8c8dc45f190ac14a71f9210cf2b4db295f7f951b.tar.lz infinity-for-reddit-8c8dc45f190ac14a71f9210cf2b4db295f7f951b.tar.xz infinity-for-reddit-8c8dc45f190ac14a71f9210cf2b4db295f7f951b.tar.zst infinity-for-reddit-8c8dc45f190ac14a71f9210cf2b4db295f7f951b.zip |
Removed option: View Full Markdown. Handle jpeg link in LinkResolverActivity.
Diffstat (limited to 'app/src/main/java')
4 files changed, 2 insertions, 17 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java index 42bc12d2..d1589c18 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java @@ -95,7 +95,7 @@ public class LinkResolverActivity extends AppCompatActivity { path = path.substring(0, path.length() - 1); } - if (path.endsWith("jpg") || path.endsWith("png")) { + if (path.endsWith("jpg") || path.endsWith("png") || path.endsWith("jpeg")) { Intent intent = new Intent(this, ViewImageOrGifActivity.class); String url = uri.toString(); String fileName = FilenameUtils.getName(path); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java index aecd9581..cf973379 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java @@ -511,10 +511,9 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment bundle.putString(CommentMoreBottomSheetFragment.EXTRA_ACCESS_TOKEN, mAccessToken); bundle.putParcelable(CommentMoreBottomSheetFragment.EXTRA_COMMENT, comment); bundle.putInt(CommentMoreBottomSheetFragment.EXTRA_POSITION, getBindingAdapterPosition()); - bundle.putString(CommentMoreBottomSheetFragment.EXTRA_COMMENT_MARKDOWN, comment.getCommentMarkdown()); CommentMoreBottomSheetFragment commentMoreBottomSheetFragment = new CommentMoreBottomSheetFragment(); commentMoreBottomSheetFragment.setArguments(bundle); - commentMoreBottomSheetFragment.show(((AppCompatActivity) mActivity).getSupportFragmentManager(), commentMoreBottomSheetFragment.getTag()); + commentMoreBottomSheetFragment.show(mActivity.getSupportFragmentManager(), commentMoreBottomSheetFragment.getTag()); } }); 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 6a0d3c53..150df09a 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java @@ -1307,7 +1307,6 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi } else { bundle.putInt(CommentMoreBottomSheetFragment.EXTRA_POSITION, getBindingAdapterPosition()); } - bundle.putString(CommentMoreBottomSheetFragment.EXTRA_COMMENT_MARKDOWN, comment.getCommentMarkdown()); bundle.putBoolean(CommentMoreBottomSheetFragment.EXTRA_IS_NSFW, mPost.isNSFW()); if (comment.getDepth() >= mDepthThreshold) { bundle.putBoolean(CommentMoreBottomSheetFragment.EXTRA_SHOW_REPLY_AND_SAVE_OPTION, true); 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 c9a47d40..1e16f010 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CommentMoreBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CommentMoreBottomSheetFragment.java @@ -23,7 +23,6 @@ import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.activities.BaseActivity; import ml.docilealligator.infinityforreddit.activities.CommentActivity; import ml.docilealligator.infinityforreddit.activities.EditCommentActivity; -import ml.docilealligator.infinityforreddit.activities.FullMarkdownActivity; import ml.docilealligator.infinityforreddit.activities.GiveAwardActivity; import ml.docilealligator.infinityforreddit.activities.ReportActivity; import ml.docilealligator.infinityforreddit.activities.ViewPostDetailActivity; @@ -43,7 +42,6 @@ public class CommentMoreBottomSheetFragment extends LandscapeExpandedRoundedBott public static final String EXTRA_EDIT_AND_DELETE_AVAILABLE = "EEADA"; public static final String EXTRA_POSITION = "EP"; public static final String EXTRA_SHOW_REPLY_AND_SAVE_OPTION = "ESSARO"; - public static final String EXTRA_COMMENT_MARKDOWN = "ECM"; public static final String EXTRA_IS_NSFW = "EIN"; @BindView(R.id.edit_text_view_comment_more_bottom_sheet_fragment) TextView editTextView; @@ -59,8 +57,6 @@ public class CommentMoreBottomSheetFragment extends LandscapeExpandedRoundedBott TextView copyTextView; @BindView(R.id.give_award_text_view_comment_more_bottom_sheet_fragment) TextView giveAwardTextView; - @BindView(R.id.view_full_markdown_text_view_comment_more_bottom_sheet_fragment) - TextView viewFullMarkdownTextView; @BindView(R.id.report_view_comment_more_bottom_sheet_fragment) TextView reportTextView; @BindView(R.id.see_removed_view_comment_more_bottom_sheet_fragment) @@ -193,15 +189,6 @@ public class CommentMoreBottomSheetFragment extends LandscapeExpandedRoundedBott copyTextBottomSheetFragment.show(activity.getSupportFragmentManager(), copyTextBottomSheetFragment.getTag()); }); - viewFullMarkdownTextView.setOnClickListener(view -> { - Intent intent = new Intent(activity, FullMarkdownActivity.class); - intent.putExtra(FullMarkdownActivity.EXTRA_IS_NSFW, bundle.getBoolean(EXTRA_IS_NSFW, false)); - intent.putExtra(FullMarkdownActivity.EXTRA_COMMENT_MARKDOWN, bundle.getString(EXTRA_COMMENT_MARKDOWN, "")); - activity.startActivity(intent); - - dismiss(); - }); - reportTextView.setOnClickListener(view -> { Intent intent = new Intent(activity, ReportActivity.class); intent.putExtra(ReportActivity.EXTRA_SUBREDDIT_NAME, comment.getSubredditName()); |