Dynamic swipe/select timeout

pull/213/head
M66B 1 year ago
parent 085bd37cad
commit 2fd935c4ff

@ -102,6 +102,7 @@ import android.view.ScrollCaptureCallback;
import android.view.ScrollCaptureSession;
import android.view.SubMenu;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
@ -402,7 +403,6 @@ public class FragmentMessages extends FragmentBase
private static final int MAX_MORE = 100; // messages
private static final int MAX_SEND_RAW = 50; // messages
private static final int SWIPE_DISABLE_SELECT_DURATION = 500; // milliseconds
private static final float LUMINANCE_THRESHOLD = 0.7f;
private static final int ITEM_CACHE_SIZE = 10; // Default: 2 items
@ -2918,7 +2918,7 @@ public class FragmentMessages extends FragmentBase
if (isCurrentlyActive)
selectionPredicate.setEnabled(false);
else
getMainHandler().postDelayed(enableSelection, SWIPE_DISABLE_SELECT_DURATION);
getMainHandler().postDelayed(enableSelection, ViewConfiguration.getLongPressTimeout() + 100);
}
Context context = getContext();

@ -85,6 +85,7 @@ import android.view.Display;
import android.view.InflateException;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.WindowManager;
import android.widget.TextView;
import android.widget.Toast;
@ -3085,6 +3086,10 @@ public class Log {
long size = 0;
File file = attachment.getFile(context);
try (OutputStream os = new BufferedOutputStream(new FileOutputStream(file))) {
size += write(os, String.format("Photo picker=%b\r\n", Helper.hasPhotoPicker()));
size += write(os, String.format("Double tap timeout=%d\r\n", ViewConfiguration.getDoubleTapTimeout()));
size += write(os, String.format("Long press timeout=%d\r\n", ViewConfiguration.getLongPressTimeout()));
for (Class<?> cls : new Class[]{
ActivitySendSelf.class,
ActivitySearch.class,

Loading…
Cancel
Save