mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-25 06:29:52 +01:00
remove unneeded null checks
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
92a2c44415
commit
da39d12a7f
@ -61,9 +61,9 @@ public class ParticipantItem extends AbstractFlexibleItem<ParticipantItem.Partic
|
||||
private static final float STATUS_SIZE_IN_DP = 9f;
|
||||
private static final String NO_ICON = "";
|
||||
|
||||
private Context context;
|
||||
private Participant participant;
|
||||
private UserEntity userEntity;
|
||||
private final Context context;
|
||||
private final Participant participant;
|
||||
private final UserEntity userEntity;
|
||||
public boolean isOnline = true;
|
||||
|
||||
public ParticipantItem(Context activityContext,
|
||||
@ -80,8 +80,8 @@ public class ParticipantItem extends AbstractFlexibleItem<ParticipantItem.Partic
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o instanceof UserItem) {
|
||||
UserItem inItem = (UserItem) o;
|
||||
if (o instanceof ParticipantItem) {
|
||||
ParticipantItem inItem = (ParticipantItem) o;
|
||||
return participant.getActorType() == inItem.getModel().getActorType() &&
|
||||
participant.getActorId().equals(inItem.getModel().getActorId());
|
||||
}
|
||||
@ -268,9 +268,6 @@ public class ParticipantItem extends AbstractFlexibleItem<ParticipantItem.Partic
|
||||
}
|
||||
|
||||
private void drawStatus(ParticipantItemViewHolder holder) {
|
||||
if (holder.binding.conversationInfoStatusMessage != null &&
|
||||
holder.binding.participantStatusEmoji != null &&
|
||||
holder.binding.userStatusImage != null) {
|
||||
float size = DisplayUtils.convertDpToPixel(STATUS_SIZE_IN_DP, context);
|
||||
holder.binding.userStatusImage.setImageDrawable(new StatusDrawable(
|
||||
participant.status,
|
||||
@ -303,7 +300,6 @@ public class ParticipantItem extends AbstractFlexibleItem<ParticipantItem.Partic
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void alignUsernameVertical(ParticipantItem.ParticipantItemViewHolder holder, float densityPixelsFromTop) {
|
||||
ConstraintLayout.LayoutParams layoutParams =
|
||||
|
Loading…
Reference in New Issue
Block a user