mirror of https://github.com/M66B/FairEmail.git
Refactoring
This commit is contained in:
parent
91910d6403
commit
48d5392b3b
|
@ -558,7 +558,7 @@ public class FragmentMessages extends FragmentBase {
|
|||
rvMessage.addOnItemTouchListener(new RecyclerView.OnItemTouchListener() {
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(@NonNull RecyclerView rv, @NonNull MotionEvent ev) {
|
||||
swipeListener.onTouch(null, ev);
|
||||
swipeListener.onTouch(rv, ev);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@ import android.view.GestureDetector;
|
|||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
public class SwipeListener implements View.OnTouchListener {
|
||||
private final GestureDetector gestureDetector;
|
||||
|
||||
|
@ -37,7 +39,7 @@ public class SwipeListener implements View.OnTouchListener {
|
|||
});
|
||||
}
|
||||
|
||||
public boolean onTouch(final View v, final MotionEvent event) {
|
||||
public boolean onTouch(@NonNull View view, @NonNull MotionEvent event) {
|
||||
return gestureDetector.onTouchEvent(event);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue