mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-12-15 05:01:45 +03:00
add grey avatar with first letter of email-guest in call view
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
c75cf2fe20
commit
199ba4be34
2 changed files with 14 additions and 1 deletions
|
@ -172,6 +172,10 @@ public class ParticipantDisplayItem {
|
|||
return raisedHand;
|
||||
}
|
||||
|
||||
public Participant.ActorType getActorType() {
|
||||
return actorType;
|
||||
}
|
||||
|
||||
public void addObserver(Observer observer) {
|
||||
participantDisplayItemNotifier.addObserver(observer);
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ import android.widget.TextView;
|
|||
import com.nextcloud.talk.R;
|
||||
import com.nextcloud.talk.activities.CallActivity;
|
||||
import com.nextcloud.talk.extensions.ImageViewExtensionsKt;
|
||||
import com.nextcloud.talk.models.json.participants.Participant;
|
||||
|
||||
import org.webrtc.MediaStream;
|
||||
import org.webrtc.MediaStreamTrack;
|
||||
|
@ -143,7 +144,15 @@ public class ParticipantsAdapter extends BaseAdapter {
|
|||
nickTextView.setVisibility(View.VISIBLE);
|
||||
nickTextView.setText(participantDisplayItem.getNick());
|
||||
}
|
||||
ImageViewExtensionsKt.loadAvatarWithUrl(imageView,null, participantDisplayItem.getUrlForAvatar());
|
||||
if (participantDisplayItem.getActorType() == Participant.ActorType.GUESTS ||
|
||||
participantDisplayItem.getActorType() == Participant.ActorType.EMAILS) {
|
||||
ImageViewExtensionsKt.loadFirstLetterAvatar(
|
||||
imageView,
|
||||
String.valueOf(participantDisplayItem.getNick().charAt(0))
|
||||
);
|
||||
} else {
|
||||
ImageViewExtensionsKt.loadAvatarWithUrl(imageView,null, participantDisplayItem.getUrlForAvatar());
|
||||
}
|
||||
}
|
||||
|
||||
ImageView audioOffView = convertView.findViewById(R.id.remote_audio_off);
|
||||
|
|
Loading…
Reference in a new issue