public void updateChat() {
   ContactTitleInflater.updateTitle(contactTitleView, getActivity(), abstractContact);
   toolbar.setBackgroundColor(accountPainter.getAccountMainColor(account));
   int itemCountBeforeUpdate = chatMessageAdapter.getItemCount();
   chatMessageAdapter.onChange();
   scrollChat(itemCountBeforeUpdate);
   setUpOptionsMenu(toolbar.getMenu());
   updateSecurityButton();
 }
Exemplo n.º 2
0
 private void update() {
   isUpdating = true;
   AbstractContact abstractContact = RosterManager.getInstance().getBestContact(account, user);
   ContactTitleInflater.updateTitle(findViewById(R.id.title), this, abstractContact);
   verifiedView.setChecked(OTRManager.getInstance().isVerified(account, user));
   scanView.setEnabled(remoteFingerprint != null);
   verifiedView.setEnabled(remoteFingerprint != null);
   ((TextView) findViewById(R.id.otr_remote_fingerprint))
       .setText(
           remoteFingerprint == null
               ? getString(R.string.unknown)
               : CertificateManager.showFingerprint(remoteFingerprint));
   showView.setEnabled(localFingerprint != null);
   copyView.setEnabled(localFingerprint != null);
   ((TextView) findViewById(R.id.otr_local_fingerprint))
       .setText(
           localFingerprint == null
               ? getString(R.string.unknown)
               : CertificateManager.showFingerprint(localFingerprint));
   isUpdating = false;
 }