mirror of
https://github.com/nextcloud/talk-android
synced 2025-02-01 04:09:21 +00:00
UI binding can never be null
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
9ae722659f
commit
b36195dc9a
@ -196,63 +196,61 @@ public class ParticipantItem extends AbstractFlexibleItem<ParticipantItem.Partic
|
||||
holder.binding.videoCallIcon.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (holder.binding.secondaryText != null) {
|
||||
String userType = "";
|
||||
String userType = "";
|
||||
|
||||
switch (new EnumParticipantTypeConverter().convertToInt(participant.getType())) {
|
||||
case 1:
|
||||
//userType = NextcloudTalkApplication.Companion.getSharedApplication().getString(R.string.nc_owner);
|
||||
//break;
|
||||
case 2:
|
||||
case 6: // Guest moderator
|
||||
switch (new EnumParticipantTypeConverter().convertToInt(participant.getType())) {
|
||||
case 1:
|
||||
//userType = NextcloudTalkApplication.Companion.getSharedApplication().getString(R.string.nc_owner);
|
||||
//break;
|
||||
case 2:
|
||||
case 6: // Guest moderator
|
||||
userType = NextcloudTalkApplication
|
||||
.Companion
|
||||
.getSharedApplication()
|
||||
.getString(R.string.nc_moderator);
|
||||
break;
|
||||
case 3:
|
||||
userType = NextcloudTalkApplication
|
||||
.Companion
|
||||
.getSharedApplication()
|
||||
.getString(R.string.nc_user);
|
||||
if (participant.getCalculatedActorType() == Participant.ActorType.GROUPS) {
|
||||
userType = NextcloudTalkApplication
|
||||
.Companion
|
||||
.getSharedApplication()
|
||||
.getString(R.string.nc_moderator);
|
||||
break;
|
||||
case 3:
|
||||
.getString(R.string.nc_group);
|
||||
}
|
||||
if (participant.getCalculatedActorType() == Participant.ActorType.CIRCLES) {
|
||||
userType = NextcloudTalkApplication
|
||||
.Companion
|
||||
.getSharedApplication()
|
||||
.getString(R.string.nc_user);
|
||||
if (participant.getCalculatedActorType() == Participant.ActorType.GROUPS) {
|
||||
userType = NextcloudTalkApplication
|
||||
.Companion
|
||||
.getSharedApplication()
|
||||
.getString(R.string.nc_group);
|
||||
}
|
||||
if (participant.getCalculatedActorType() == Participant.ActorType.CIRCLES) {
|
||||
userType = NextcloudTalkApplication
|
||||
.Companion
|
||||
.getSharedApplication()
|
||||
.getString(R.string.nc_circle);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
userType = NextcloudTalkApplication.Companion.getSharedApplication().getString(R.string.nc_guest);
|
||||
if (participant.getCalculatedActorType() == Participant.ActorType.EMAILS) {
|
||||
userType = NextcloudTalkApplication
|
||||
.Companion
|
||||
.getSharedApplication()
|
||||
.getString(R.string.nc_email);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
.getString(R.string.nc_circle);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
userType = NextcloudTalkApplication.Companion.getSharedApplication().getString(R.string.nc_guest);
|
||||
if (participant.getCalculatedActorType() == Participant.ActorType.EMAILS) {
|
||||
userType = NextcloudTalkApplication
|
||||
.Companion
|
||||
.getSharedApplication()
|
||||
.getString(R.string.nc_following_link);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
.getString(R.string.nc_email);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
userType = NextcloudTalkApplication
|
||||
.Companion
|
||||
.getSharedApplication()
|
||||
.getString(R.string.nc_following_link);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!userType.equals(NextcloudTalkApplication
|
||||
.Companion
|
||||
.getSharedApplication()
|
||||
.getString(R.string.nc_user))) {
|
||||
holder.binding.secondaryText.setText("(" + userType + ")");
|
||||
}
|
||||
if (!userType.equals(NextcloudTalkApplication
|
||||
.Companion
|
||||
.getSharedApplication()
|
||||
.getString(R.string.nc_user))) {
|
||||
holder.binding.secondaryText.setText("(" + userType + ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user