Fix delete contact and bubble chat
This commit is contained in:
parent
d9cea544df
commit
3bf5905bc0
2 changed files with 26 additions and 24 deletions
|
@ -482,6 +482,7 @@ public class EditContactFragment extends Fragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void delete() {
|
public void delete() {
|
||||||
|
if(contact != null) {
|
||||||
if (isSipAddress) {
|
if (isSipAddress) {
|
||||||
if (contact.hasFriends()) {
|
if (contact.hasFriends()) {
|
||||||
ContactsManager.getInstance().removeFriend(oldNumberOrAddress);
|
ContactsManager.getInstance().removeFriend(oldNumberOrAddress);
|
||||||
|
@ -503,6 +504,7 @@ public class EditContactFragment extends Fragment {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void addNewNumber() {
|
private void addNewNumber() {
|
||||||
if (newNumberOrAddress == null || newNumberOrAddress.length() == 0) {
|
if (newNumberOrAddress == null || newNumberOrAddress.length() == 0) {
|
||||||
|
|
|
@ -175,6 +175,7 @@ public class BubbleChat {
|
||||||
appData = "file://" + appData;
|
appData = "file://" + appData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bm != null) {
|
||||||
if (bm.getWidth() > bm.getHeight() && bm.getWidth() > SIZE_MAX) {
|
if (bm.getWidth() > bm.getHeight() && bm.getWidth() > SIZE_MAX) {
|
||||||
bm = Bitmap.createScaledBitmap(bm, SIZE_MAX, (SIZE_MAX * bm.getHeight()) / bm.getWidth(), false);
|
bm = Bitmap.createScaledBitmap(bm, SIZE_MAX, (SIZE_MAX * bm.getHeight()) / bm.getWidth(), false);
|
||||||
} else if (bm.getHeight() > bm.getWidth() && bm.getHeight() > SIZE_MAX) {
|
} 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);
|
bm = Bitmap.createScaledBitmap(bm, (SIZE_MAX * bm.getWidth()) / bm.getHeight(), SIZE_MAX, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bm != null) {
|
|
||||||
imageView.setImageBitmap(bm);
|
imageView.setImageBitmap(bm);
|
||||||
imageView.setTag(appData);
|
imageView.setTag(appData);
|
||||||
imageView.setOnClickListener(new OnClickListener() {
|
imageView.setOnClickListener(new OnClickListener() {
|
||||||
|
|
Loading…
Reference in a new issue