Merge pull request #1423 from nextcloud/bugfix/1422/baseUrlNull

Only parse baseURl if not empty
This commit is contained in:
Andy Scherzinger 2021-07-09 11:21:27 +02:00 committed by GitHub
commit a644fa9e7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,6 +22,7 @@ package com.nextcloud.talk.adapters.items;
import android.accounts.Account;
import android.net.Uri;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
@ -123,7 +124,9 @@ public class AdvancedUserItem extends AbstractFlexibleItem<AdvancedUserItem.User
holder.contactDisplayName.setText(participant.getDisplayName());
}
holder.serverUrl.setText((Uri.parse(userEntity.getBaseUrl()).getHost()));
if (userEntity != null && !TextUtils.isEmpty(userEntity.getBaseUrl())) {
holder.serverUrl.setText((Uri.parse(userEntity.getBaseUrl()).getHost()));
}
holder.avatarImageView.getHierarchy().setPlaceholderImage(R.drawable.account_circle_48dp);
holder.avatarImageView.getHierarchy().setFailureImage(R.drawable.account_circle_48dp);