mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Let stickers handle clicks
This commit is contained in:
@@ -500,7 +500,7 @@ public class ConversationItem extends LinearLayout
|
||||
bodyBubble.setBackgroundColor(Color.TRANSPARENT);
|
||||
|
||||
stickerStub.get().setSlide(glideRequests, new StickerSlide(context, messageRecord));
|
||||
//stickerStub.get().setThumbnailClickListener(passthroughClickListener);
|
||||
stickerStub.get().setThumbnailClickListener(new StickerClickListener());
|
||||
|
||||
stickerStub.get().setOnLongClickListener(passthroughClickListener);
|
||||
stickerStub.get().setOnClickListener(passthroughClickListener);
|
||||
@@ -780,6 +780,16 @@ public class ConversationItem extends LinearLayout
|
||||
}
|
||||
}
|
||||
|
||||
private class StickerClickListener implements SlideClickListener {
|
||||
public void onClick(final View v, final Slide slide) {
|
||||
if (dcChat.getId() == DcChat.DC_CHAT_ID_DEADDROP && batchSelected.isEmpty()) {
|
||||
handleDeadDropClick();
|
||||
} else if (shouldInterceptClicks(messageRecord) || !batchSelected.isEmpty()) {
|
||||
performClick();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class PassthroughClickListener implements View.OnLongClickListener, View.OnClickListener {
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user