예제 #1
0
        private async Task SetupIntelocutorInfo()
        {
            textViewUserName.Text = conversationInfoModel.InterlocutorName;
            if (conversationInfoModel.InterlocutorPrifileImage != null)
            {
                if (conversationInfoModel.InterlocutorPrifileImage.Length > 0)
                {
                    profileImageView.SetImageBitmap(await this.bitmapService.GetScaledDownBitmapForDisplayAsync(conversationInfoModel.InterlocutorPrifileImage));
                }
                else
                {
                    var imageBytes = await signInService.GetUserProfileImage(bearerToken, conversationInfoModel.InterlocutorId);

                    if (imageBytes != null)
                    {
                        profileImageView.SetImageBitmap(await this.bitmapService.GetScaledDownBitmapForDisplayAsync(imageBytes));
                    }
                    else
                    {
                        profileImageView.SetImageDrawable(ContextCompat.GetDrawable(this, Resource.Drawable.logo_user));
                    }
                }
            }
        }