aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2019-11-19 02:12:34 +0000
committerAlex Ning <chineseperson5@gmail.com>2019-11-19 02:12:34 +0000
commitc7df7399f9ab2e982ec9e4c4b3ef01e9395f8ae1 (patch)
tree182fefd0646e31bc5b0ce1c97dd5696c7d81c1f1 /app/src/main/java
parent5f3a7fd74ae0d1851f5bf8d8de56452e277a8643 (diff)
downloadinfinity-for-reddit-c7df7399f9ab2e982ec9e4c4b3ef01e9395f8ae1.tar
infinity-for-reddit-c7df7399f9ab2e982ec9e4c4b3ef01e9395f8ae1.tar.gz
infinity-for-reddit-c7df7399f9ab2e982ec9e4c4b3ef01e9395f8ae1.tar.bz2
infinity-for-reddit-c7df7399f9ab2e982ec9e4c4b3ef01e9395f8ae1.tar.lz
infinity-for-reddit-c7df7399f9ab2e982ec9e4c4b3ef01e9395f8ae1.tar.xz
infinity-for-reddit-c7df7399f9ab2e982ec9e4c4b3ef01e9395f8ae1.tar.zst
infinity-for-reddit-c7df7399f9ab2e982ec9e4c4b3ef01e9395f8ae1.zip
Disable double touch to upvote in comments due to the link in comments cannot be opened.
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java32
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentsListingRecyclerViewAdapter.java34
2 files changed, 0 insertions, 66 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java
index 745a1c96..64d91b5a 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java
@@ -864,38 +864,6 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
}, mVisibleComments.get(commentPosition).getFullName(), newVoteType, holder.getAdapterPosition());
});
- ((CommentViewHolder) holder).commentMarkdownView.setOnTouchListener(new View.OnTouchListener() {
- private GestureDetector gestureDetector = new GestureDetector(mActivity, new GestureDetector.SimpleOnGestureListener() {
- @Override
- public boolean onDoubleTap(MotionEvent e) {
- ((CommentViewHolder) holder).upVoteButton.performClick();
- return super.onDoubleTap(e);
- }
- });
-
- @Override
- public boolean onTouch(View view, MotionEvent motionEvent) {
- gestureDetector.onTouchEvent(motionEvent);
- return true;
- }
- });
-
- ((CommentViewHolder) holder).itemView.setOnTouchListener(new View.OnTouchListener() {
- private GestureDetector gestureDetector = new GestureDetector(mActivity, new GestureDetector.SimpleOnGestureListener() {
- @Override
- public boolean onDoubleTap(MotionEvent e) {
- ((CommentViewHolder) holder).upVoteButton.performClick();
- return super.onDoubleTap(e);
- }
- });
-
- @Override
- public boolean onTouch(View view, MotionEvent motionEvent) {
- gestureDetector.onTouchEvent(motionEvent);
- return true;
- }
- });
-
if (comment.isSaved()) {
((CommentViewHolder) holder).saveButton.setImageResource(R.drawable.ic_bookmark_grey_24dp);
} else {
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentsListingRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentsListingRecyclerViewAdapter.java
index e27810f2..ed76dcba 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentsListingRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentsListingRecyclerViewAdapter.java
@@ -6,9 +6,7 @@ import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.util.Linkify;
-import android.view.GestureDetector;
import android.view.LayoutInflater;
-import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
@@ -309,38 +307,6 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
}, comment.getFullName(), newVoteType, holder.getAdapterPosition());
});
- ((DataViewHolder) holder).commentMarkdownView.setOnTouchListener(new View.OnTouchListener() {
- private GestureDetector gestureDetector = new GestureDetector(mContext, new GestureDetector.SimpleOnGestureListener() {
- @Override
- public boolean onDoubleTap(MotionEvent e) {
- ((DataViewHolder) holder).upvoteButton.performClick();
- return super.onDoubleTap(e);
- }
- });
-
- @Override
- public boolean onTouch(View view, MotionEvent motionEvent) {
- gestureDetector.onTouchEvent(motionEvent);
- return true;
- }
- });
-
- ((DataViewHolder) holder).itemView.setOnTouchListener(new View.OnTouchListener() {
- private GestureDetector gestureDetector = new GestureDetector(mContext, new GestureDetector.SimpleOnGestureListener() {
- @Override
- public boolean onDoubleTap(MotionEvent e) {
- ((DataViewHolder) holder).upvoteButton.performClick();
- return super.onDoubleTap(e);
- }
- });
-
- @Override
- public boolean onTouch(View view, MotionEvent motionEvent) {
- gestureDetector.onTouchEvent(motionEvent);
- return true;
- }
- });
-
if (comment.isSaved()) {
((DataViewHolder) holder).saveButton.setImageResource(R.drawable.ic_bookmark_grey_24dp);
} else {