1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-26 08:37:29 +00:00

No background for media items

This commit is contained in:
Ammar Githam 2021-01-03 19:25:13 +09:00
parent be53864f02
commit f1721c37ec
2 changed files with 5 additions and 4 deletions

View File

@ -50,7 +50,6 @@ public class DirectItemMediaViewHolder extends DirectItemViewHolder {
incomingRoundingParams = RoundingParams.fromCornersRadii(dmRadiusSmall, dmRadius, dmRadius, dmRadius);
outgoingRoundingParams = RoundingParams.fromCornersRadii(dmRadius, dmRadiusSmall, dmRadius, dmRadius);
setItemView(binding.getRoot());
removeBg();
}
@Override

View File

@ -100,10 +100,8 @@ public abstract class DirectItemViewHolder extends RecyclerView.ViewHolder {
binding.ivProfilePic.setVisibility(View.GONE);
binding.tvUsername.setVisibility(View.GONE);
containerLayoutParams.gravity = Gravity.CENTER;
if (itemType == DirectItemType.ACTION_LOG || itemType == DirectItemType.VIDEO_CALL_EVENT) {
binding.messageInfo.setVisibility(View.GONE);
}
}
if (itemType == DirectItemType.REEL_SHARE) {
containerLayoutParams.setMarginStart(0);
containerLayoutParams.setMarginEnd(0);
@ -119,6 +117,10 @@ public abstract class DirectItemViewHolder extends RecyclerView.ViewHolder {
messageInfoPaddingSmall,
dmRadiusSmall);
}
if (itemType == DirectItemType.MEDIA) {
// no background for media items
binding.background.setBackgroundResource(0);
}
binding.messageTime.setText(DateFormat.getTimeFormat(itemView.getContext()).format(item.getDate()));
if (messageDirection == MessageDirection.OUTGOING) {
if (item.isPending()) {