[UI] presence avatar updated

This commit is contained in:
Brieuc Viel 2016-04-28 11:07:44 +02:00
parent 4540cad7f7
commit 9c739bf234
4 changed files with 6 additions and 4 deletions

View file

@ -364,7 +364,6 @@ public class ChatListFragment extends Fragment implements OnClickListener, OnIte
Long time;
AvatarWithPresenceImage avatarWithPresenceImage = (AvatarWithPresenceImage) view.findViewById(R.id.avatar_with_presence);
avatarWithPresenceImage.setFormatAvatarImage(AvatarWithPresenceImage.AVATAR_SMALL);
if(contact != null && contact.isLinphoneFriend()) {
avatarWithPresenceImage.setLinphoneContact(contact);
LinphoneManager.getInstance().addPresenceUpdatedListener(avatarWithPresenceImage);

View file

@ -356,7 +356,7 @@ public class ContactsListFragment extends Fragment implements OnClickListener, O
public void onPause() {
instance = null;
ContactsManager.removeContactsListener(this);
LinphoneManager.getInstance().removePresenceUpdatedListener();
//LinphoneManager.getInstance().removePresenceUpdatedListener();
super.onPause();
}
@ -435,7 +435,6 @@ public class ContactsListFragment extends Fragment implements OnClickListener, O
}
AvatarWithPresenceImage avatarWithPresenceImage = (AvatarWithPresenceImage) view.findViewById(R.id.avatar_with_presence);
avatarWithPresenceImage.setFormatAvatarImage(AvatarWithPresenceImage.AVATAR_SMALL);
if(contact != null && contact.isLinphoneFriend()) {
avatarWithPresenceImage.setLinphoneContact(contact);
LinphoneManager.getInstance().addPresenceUpdatedListener(avatarWithPresenceImage);

View file

@ -449,7 +449,6 @@ public class HistoryListFragment extends Fragment implements OnClickListener, On
*/ holder.contact.setText(LinphoneUtils.getAddressDisplayName(address));
// }
holder.avatarWithPresenceImage.setFormatAvatarImage(AvatarWithPresenceImage.AVATAR_SMALL);
if(c != null && c.isLinphoneFriend() ) {
holder.avatarWithPresenceImage.setLinphoneContact(c);
LinphoneManager.getInstance().addPresenceUpdatedListener(holder.avatarWithPresenceImage);

View file

@ -55,6 +55,11 @@ public class AvatarWithPresenceImage extends RelativeLayout implements onPresenc
friendStatusBig = (ImageView) this.findViewById(R.id.friend_status_big);
contactPictureBig = (ImageView) this.findViewById(R.id.contact_picture_big);
friendStatusSmall.setVisibility(View.VISIBLE);
contactPictureSmall.setVisibility(View.VISIBLE);
friendStatusBig.setVisibility(View.GONE);
contactPictureBig.setVisibility(View.GONE);
}
public void setFormatAvatarImage(int format){