mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-03 23:56:07 +02:00
Added setting for left/right swipe sensitivity
This commit is contained in:
@@ -1982,6 +1982,17 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public float getSwipeEscapeVelocity(float defaultValue) {
|
||||
int swipe_sensitivity = 10;
|
||||
Context context = getContext();
|
||||
if (context != null) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
swipe_sensitivity = prefs.getInt("swipe_sensitivity", 10);
|
||||
}
|
||||
return super.getSwipeEscapeVelocity(defaultValue) * (10 - swipe_sensitivity + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMovementFlags(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder) {
|
||||
int pos = viewHolder.getAdapterPosition();
|
||||
|
||||
Reference in New Issue
Block a user