Small improvement

This commit is contained in:
M66B 2020-01-02 19:22:22 +01:00
parent e62e661a24
commit 16e07f255f
1 changed files with 14 additions and 13 deletions

View File

@ -557,20 +557,21 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
}
private void wire() {
final View touch = (viewType == ViewType.THREAD ? ibExpander : vwColor);
final View touch = (viewType == ViewType.THREAD ? ibExpander : header);
touch.setOnClickListener(this);
view.post(new Runnable() {
@Override
public void run() {
Rect rect = new Rect(
header.getLeft(),
header.getTop(),
header.getRight(),
header.getBottom());
view.setTouchDelegate(new TouchDelegate(rect, touch));
}
});
view.setOnKeyListener(this);
if (touch == ibExpander)
header.post(new Runnable() {
@Override
public void run() {
Rect rect = new Rect(
header.getLeft(),
header.getTop(),
header.getRight(),
header.getBottom());
header.setTouchDelegate(new TouchDelegate(rect, touch));
}
});
header.setOnKeyListener(this);
ibAvatar.setOnClickListener(this);
ibAuth.setOnClickListener(this);