Esempio n. 1
0
 private void updateChatHeadUI(Conversation conversation) {
   boolean shouldFadeIn = this.rootView.getVisibility() != 0;
   AvatarUtils.createAvatar(
       conversation.getLastAdmin().getAvatar(), this.notificationAvatar, this);
   String lastAdminText = conversation.getLastAdminPart().getSummary();
   if (lastAdminText.isEmpty()) {
     this.notificationText.setText(C0901R.string.intercomsdk_image_attached);
   } else {
     this.notificationText.setText(lastAdminText);
   }
   this.indicatorText.setText(String.valueOf(this.unreadCount));
   showChathead();
   if (shouldFadeIn) {
     fadeInChatHead();
   }
   if (!this.currentlyDisplayedConversation.equals(conversation)) {
     animateTextBubble();
     playSound();
   }
   this.currentlyDisplayedConversation = conversation;
 }