Double click per message

pull/212/head
M66B 2 years ago
parent 819df23aec
commit 502dc42ae6

@ -322,7 +322,6 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
private boolean gotoTop = false; private boolean gotoTop = false;
private Integer gotoPos = null; private Integer gotoPos = null;
private boolean firstClick = false;
private AsyncPagedListDiffer<TupleMessageEx> differ; private AsyncPagedListDiffer<TupleMessageEx> differ;
private Map<Long, Integer> keyPosition = new HashMap<>(); private Map<Long, Integer> keyPosition = new HashMap<>();
private Map<Integer, Long> positionKey = new HashMap<>(); private Map<Integer, Long> positionKey = new HashMap<>();
@ -4339,13 +4338,15 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
return; return;
} }
firstClick = !firstClick; boolean firstClick = !properties.getValue("firstClick", message.id);
properties.setValue("firstClick", message.id, firstClick);
if (firstClick) { if (firstClick) {
ApplicationEx.getMainHandler().postDelayed(new Runnable() { ApplicationEx.getMainHandler().postDelayed(new Runnable() {
@Override @Override
public void run() { public void run() {
boolean firstClick = properties.getValue("firstClick", message.id);
if (firstClick) { if (firstClick) {
firstClick = false; properties.setValue("firstClick", message.id, false);
lbm.sendBroadcast(viewThread); lbm.sendBroadcast(viewThread);
properties.setValue("selected", message.id, true); properties.setValue("selected", message.id, true);
} }

Loading…
Cancel
Save