Fix delete contact and bubble chat

This commit is contained in:
Margaux Clerc 2015-05-12 17:33:43 +02:00
parent d9cea544df
commit 3bf5905bc0
2 changed files with 26 additions and 24 deletions

View file

@ -482,6 +482,7 @@ public class EditContactFragment extends Fragment {
}
public void delete() {
if(contact != null) {
if (isSipAddress) {
if (contact.hasFriends()) {
ContactsManager.getInstance().removeFriend(oldNumberOrAddress);
@ -503,6 +504,7 @@ public class EditContactFragment extends Fragment {
);
}
}
}
private void addNewNumber() {
if (newNumberOrAddress == null || newNumberOrAddress.length() == 0) {

View file

@ -175,6 +175,7 @@ public class BubbleChat {
appData = "file://" + appData;
}
if (bm != null) {
if (bm.getWidth() > bm.getHeight() && bm.getWidth() > SIZE_MAX) {
bm = Bitmap.createScaledBitmap(bm, SIZE_MAX, (SIZE_MAX * bm.getHeight()) / bm.getWidth(), false);
} else if (bm.getHeight() > bm.getWidth() && bm.getHeight() > SIZE_MAX) {
@ -182,7 +183,6 @@ public class BubbleChat {
bm = Bitmap.createScaledBitmap(bm, (SIZE_MAX * bm.getWidth()) / bm.getHeight(), SIZE_MAX, false);
}
if (bm != null) {
imageView.setImageBitmap(bm);
imageView.setTag(appData);
imageView.setOnClickListener(new OnClickListener() {