mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-22 21:15:30 +03:00
Fix a crashing bug
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
2592e8bbaf
commit
5445edacd7
1 changed files with 16 additions and 14 deletions
|
@ -1577,23 +1577,25 @@ public class CallController extends BaseController {
|
|||
}
|
||||
|
||||
private void setupAvatarForSession(String session) {
|
||||
RelativeLayout relativeLayout = remoteRenderersLayout.findViewWithTag(session);
|
||||
if (relativeLayout != null) {
|
||||
ImageView avatarImageView = relativeLayout.findViewById(R.id.avatarImageView);
|
||||
if (remoteRenderersLayout != null) {
|
||||
RelativeLayout relativeLayout = remoteRenderersLayout.findViewWithTag(session);
|
||||
if (relativeLayout != null) {
|
||||
ImageView avatarImageView = relativeLayout.findViewById(R.id.avatarImageView);
|
||||
|
||||
if (participantMap.containsKey(session) && avatarImageView.getDrawable() == null) {
|
||||
if (participantMap.containsKey(session) && avatarImageView.getDrawable() == null) {
|
||||
|
||||
int size = Math.round(getResources().getDimension(R.dimen.avatar_size_big));
|
||||
int size = Math.round(getResources().getDimension(R.dimen.avatar_size_big));
|
||||
|
||||
if (getActivity() != null) {
|
||||
GlideApp.with(getActivity())
|
||||
.asBitmap()
|
||||
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
||||
.load(ApiUtils.getUrlForAvatarWithName(baseUrl, participantMap.get(session).getUserId(), R.dimen.avatar_size_big))
|
||||
.centerInside()
|
||||
.override(size, size)
|
||||
.apply(RequestOptions.bitmapTransform(new CircleCrop()))
|
||||
.into(avatarImageView);
|
||||
if (getActivity() != null) {
|
||||
GlideApp.with(getActivity())
|
||||
.asBitmap()
|
||||
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
||||
.load(ApiUtils.getUrlForAvatarWithName(baseUrl, participantMap.get(session).getUserId(), R.dimen.avatar_size_big))
|
||||
.centerInside()
|
||||
.override(size, size)
|
||||
.apply(RequestOptions.bitmapTransform(new CircleCrop()))
|
||||
.into(avatarImageView);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue