aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-05-05 06:30:46 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-05-05 06:30:46 +0000
commit893c8a20769684e2d4493945aa69059e10a5f7e2 (patch)
tree6e850997abf7f383cb1e0614ab160a3b3dece0a7 /app/src/main/java
parentd444a3a084d82b65e41e15282c11694e7cde7d7a (diff)
downloadinfinity-for-reddit-893c8a20769684e2d4493945aa69059e10a5f7e2.tar
infinity-for-reddit-893c8a20769684e2d4493945aa69059e10a5f7e2.tar.gz
infinity-for-reddit-893c8a20769684e2d4493945aa69059e10a5f7e2.tar.bz2
infinity-for-reddit-893c8a20769684e2d4493945aa69059e10a5f7e2.tar.lz
infinity-for-reddit-893c8a20769684e2d4493945aa69059e10a5f7e2.tar.xz
infinity-for-reddit-893c8a20769684e2d4493945aa69059e10a5f7e2.tar.zst
infinity-for-reddit-893c8a20769684e2d4493945aa69059e10a5f7e2.zip
Reporting comments is now available.
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ReportActivity.java1
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/CommentMoreBottomSheetFragment.java12
2 files changed, 13 insertions, 0 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ReportActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ReportActivity.java
index 3092b8c7..4e3a0738 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ReportActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ReportActivity.java
@@ -161,6 +161,7 @@ public class ReportActivity extends BaseActivity {
case R.id.action_send_report_activity:
ReportReason reportReason = mAdapter.getSelectedReason();
if (reportReason != null) {
+ Toast.makeText(ReportActivity.this, R.string.reporting, Toast.LENGTH_SHORT).show();
ReportThing.reportThing(mOauthRetrofit, mAccessToken, mFullname, mSubredditName,
reportReason.getReasonType(), reportReason.getReportReason(), new ReportThing.ReportThingListener() {
@Override
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/CommentMoreBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/CommentMoreBottomSheetFragment.java
index d339b5f6..fd97f1d4 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/CommentMoreBottomSheetFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/CommentMoreBottomSheetFragment.java
@@ -22,6 +22,7 @@ import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
import butterknife.BindView;
import butterknife.ButterKnife;
import ml.docilealligator.infinityforreddit.Activity.EditCommentActivity;
+import ml.docilealligator.infinityforreddit.Activity.ReportActivity;
import ml.docilealligator.infinityforreddit.Activity.ViewPostDetailActivity;
import ml.docilealligator.infinityforreddit.Activity.ViewUserDetailActivity;
import ml.docilealligator.infinityforreddit.CommentData;
@@ -44,6 +45,8 @@ public class CommentMoreBottomSheetFragment extends RoundedBottomSheetDialogFrag
TextView shareTextView;
@BindView(R.id.copy_text_view_comment_more_bottom_sheet_fragment)
TextView copyTextView;
+ @BindView(R.id.report_view_comment_more_bottom_sheet_fragment)
+ TextView reportTextView;
private AppCompatActivity activity;
public CommentMoreBottomSheetFragment() {
// Required empty public constructor
@@ -119,6 +122,15 @@ public class CommentMoreBottomSheetFragment extends RoundedBottomSheetDialogFrag
copyTextBottomSheetFragment.show(activity.getSupportFragmentManager(), copyTextBottomSheetFragment.getTag());
});
+ reportTextView.setOnClickListener(view -> {
+ Intent intent = new Intent(activity, ReportActivity.class);
+ intent.putExtra(ReportActivity.EXTRA_SUBREDDIT_NAME, commentData.getSubredditName());
+ intent.putExtra(ReportActivity.EXTRA_THING_FULLNAME, commentData.getFullName());
+ activity.startActivity(intent);
+
+ dismiss();
+ });
+
return rootView;
}