public ProfilePictureUpload(Contact contact, Context context, TextView displayNameTextView, TextView statusTextView, TextView contactNumberTextView) { this.context = context; this.status = contact.getStatus(); this.displayName = contact.getFullName(); this.contactNumber = contact.getContactNumber(); this.weakReferenceStatus = new WeakReference<TextView>(statusTextView); this.weakReferenceDisplayName = new WeakReference<TextView>(displayNameTextView); this.weakReferenceContactNumber = new WeakReference<TextView>(contactNumberTextView); this.fileClientService = new FileClientService(getActivity()); this.userService = UserService.getInstance(context); }
public void refreshContactData() { if (contact != null) { Contact updateContact = baseContactService.getContactById(contact.getContactIds()); if (updateContact != null && (!TextUtils.isEmpty(contact.getImageURL())) && (!contact.getImageURL().equals(updateContact.getImageURL()))) { contactImageLoader.loadImage(updateContact, contactImage); } if (!TextUtils.isEmpty(updateContact.getStatus())) { status_cardView.setVisibility(View.VISIBLE); status.setText(updateContact.getStatus()); } if (!TextUtils.isEmpty(updateContact.getContactNumber())) { phone_cardView.setVisibility(View.VISIBLE); phone.setText(updateContact.getContactNumber()); } if (updateContact != null && (!TextUtils.isEmpty(contact.getDisplayName())) && (!contact.getDisplayName().equals(updateContact.getDisplayName()))) { name_cardView.setVisibility(View.VISIBLE); name.setText(updateContact.getDisplayName()); reload(); } } }
contentValues.put(MobiComDatabaseHelper.UNREAD_COUNT, contact.getUnreadCount()); contentValues.put(MobiComDatabaseHelper.STATUS, contact.getStatus()); if (contact.isBlocked()) { contentValues.put(MobiComDatabaseHelper.BLOCKED, contact.isBlocked());