mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 17:29:32 +01:00
Reduce sensitivity of swipe-to-archive.
This commit is contained in:
committed by
Alex Hart
parent
b1c006657a
commit
213517f875
@@ -1468,6 +1468,9 @@ public class ConversationListFragment extends MainFragment implements ActionMode
|
||||
private final int archiveColorStart;
|
||||
private final int archiveColorEnd;
|
||||
|
||||
private final float ESCAPE_VELOCITY = ViewUtil.dpToPx(1000);
|
||||
private final float VELOCITY_THRESHOLD = ViewUtil.dpToPx(1000);
|
||||
|
||||
private WeakReference<RecyclerView.ViewHolder> lastTouched;
|
||||
|
||||
ArchiveListenerCallback(@ColorInt int archiveColorStart, @ColorInt int archiveColorEnd) {
|
||||
@@ -1484,6 +1487,16 @@ public class ConversationListFragment extends MainFragment implements ActionMode
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getSwipeEscapeVelocity(float defaultValue) {
|
||||
return Math.min(ESCAPE_VELOCITY, VELOCITY_THRESHOLD);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getSwipeVelocityThreshold(float defaultValue) {
|
||||
return VELOCITY_THRESHOLD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSwipeDirs(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder) {
|
||||
if (viewHolder.itemView instanceof ConversationListItemAction ||
|
||||
|
||||
Reference in New Issue
Block a user