Only show the server host in the account switcher as well

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2021-05-07 23:16:28 +02:00 committed by Andy Scherzinger
parent 21093282f9
commit a1bee6a776
No known key found for this signature in database
GPG Key ID: 6CADC7E3523C308B

View File

@ -21,6 +21,7 @@
package com.nextcloud.talk.adapters.items;
import android.accounts.Account;
import android.net.Uri;
import android.view.View;
import android.widget.*;
import androidx.annotation.Nullable;
@ -113,7 +114,7 @@ public class AdvancedUserItem extends AbstractFlexibleItem<AdvancedUserItem.User
holder.contactDisplayName.setText(participant.getDisplayName());
}
holder.serverUrl.setText(userEntity.getBaseUrl());
holder.serverUrl.setText((Uri.parse(userEntity.getBaseUrl()).getHost()));
if (userEntity != null && userEntity.getBaseUrl() != null && userEntity.getBaseUrl().startsWith("http://") || userEntity.getBaseUrl().startsWith("https://")) {
holder.avatarImageView.setVisibility(View.VISIBLE);