11111
This commit is contained in:
@@ -31,16 +31,18 @@ public class PDLiveMessageListAdapter extends MessageListAdapter {
|
||||
Message.MessageDirection messageDirection = mDataList.get(position).getMessage().getMessageDirection();
|
||||
Message.SentStatus sentStatus = mDataList.get(position).getMessage().getSentStatus();
|
||||
ImageView readReceipt = holder.getConvertView().findViewById(R.id.rc_read_receipt);
|
||||
readReceipt.setVisibility(View.GONE);
|
||||
ImageView readReceiptNew = holder.getConvertView().findViewById(R.id.rc_read_receipt_new);
|
||||
if (readReceipt != null && readReceiptNew != null) {
|
||||
if (readReceipt.getVisibility() == View.VISIBLE) {
|
||||
readReceipt.setVisibility(View.GONE);
|
||||
if (!mDataList.get(position).getMessage().getSenderUserId().equals(mDataList.get(position).getTargetId())) {
|
||||
if (sentStatus.equals(Message.SentStatus.READ)) {
|
||||
readReceiptNew.setBackgroundResource(R.mipmap.icon_message_read);
|
||||
} else {
|
||||
if (messageDirection.equals(Message.MessageDirection.SEND) && sentStatus.equals(Message.SentStatus.SENT))
|
||||
readReceiptNew.setBackgroundResource(R.mipmap.icon_message_unread);
|
||||
readReceiptNew.setBackgroundResource(R.mipmap.icon_message_unread);
|
||||
}
|
||||
} else {
|
||||
readReceipt.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
holder.getConvertView().setOnTouchListener(new View.OnTouchListener() {
|
||||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
@@ -50,4 +52,5 @@ public class PDLiveMessageListAdapter extends MessageListAdapter {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user