mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 14:27:24 +00:00
Use comparison operator rather than equals for enums in adapters
Fixes SPP_EQUALS_ON_ENUM issue from SpotBugs. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
969c08ea79
commit
fb0fe8587a
@ -145,8 +145,8 @@ public class ContactItem extends AbstractFlexibleItem<ContactItem.ContactItemVie
|
||||
}
|
||||
|
||||
if (TextUtils.isEmpty(participant.getDisplayName()) &&
|
||||
(participant.getType().equals(Participant.ParticipantType.GUEST) ||
|
||||
participant.getType().equals(Participant.ParticipantType.USER_FOLLOWING_LINK))) {
|
||||
(participant.getType() == Participant.ParticipantType.GUEST ||
|
||||
participant.getType() == Participant.ParticipantType.USER_FOLLOWING_LINK)) {
|
||||
holder.binding.nameText.setText(NextcloudTalkApplication
|
||||
.Companion
|
||||
.getSharedApplication()
|
||||
@ -167,8 +167,8 @@ public class ContactItem extends AbstractFlexibleItem<ContactItem.ContactItemVie
|
||||
|
||||
} else if (
|
||||
participant.getCalculatedActorType() == Participant.ActorType.GUESTS ||
|
||||
Participant.ParticipantType.GUEST.equals(participant.getType()) ||
|
||||
Participant.ParticipantType.GUEST_MODERATOR.equals(participant.getType())) {
|
||||
participant.getType() == Participant.ParticipantType.GUEST ||
|
||||
participant.getType() == Participant.ParticipantType.GUEST_MODERATOR) {
|
||||
|
||||
String displayName;
|
||||
|
||||
|
@ -274,7 +274,7 @@ public class ConversationItem extends AbstractFlexibleItem<ConversationItem.Conv
|
||||
}
|
||||
}
|
||||
|
||||
if (Conversation.ConversationType.ROOM_SYSTEM.equals(conversation.getType())) {
|
||||
if (conversation.getType() == Conversation.ConversationType.ROOM_SYSTEM) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
|
||||
Drawable[] layers = new Drawable[2];
|
||||
|
@ -140,8 +140,8 @@ public class ParticipantItem extends AbstractFlexibleItem<ParticipantItem.Partic
|
||||
}
|
||||
|
||||
if (TextUtils.isEmpty(participant.getDisplayName()) &&
|
||||
(participant.getType().equals(Participant.ParticipantType.GUEST) ||
|
||||
participant.getType().equals(Participant.ParticipantType.USER_FOLLOWING_LINK))) {
|
||||
(participant.getType() == Participant.ParticipantType.GUEST ||
|
||||
participant.getType() == Participant.ParticipantType.USER_FOLLOWING_LINK)) {
|
||||
holder.binding.nameText.setText(NextcloudTalkApplication
|
||||
.Companion
|
||||
.getSharedApplication()
|
||||
@ -170,8 +170,8 @@ public class ParticipantItem extends AbstractFlexibleItem<ParticipantItem.Partic
|
||||
holder.binding.avatarDraweeView.setImageResource(R.drawable.ic_circular_mail);
|
||||
}
|
||||
} else if (participant.getCalculatedActorType() == Participant.ActorType.GUESTS ||
|
||||
Participant.ParticipantType.GUEST.equals(participant.getType()) ||
|
||||
Participant.ParticipantType.GUEST_MODERATOR.equals(participant.getType())) {
|
||||
participant.getType() == Participant.ParticipantType.GUEST ||
|
||||
participant.getType() == Participant.ParticipantType.GUEST_MODERATOR) {
|
||||
|
||||
String displayName = NextcloudTalkApplication.Companion.getSharedApplication()
|
||||
.getResources().getString(R.string.nc_guest);
|
||||
|
Loading…
Reference in New Issue
Block a user