fix failed incoming MMS regression

Fixes #4308
Closes #4334
// FREEBIE
This commit is contained in:
Jake McGinty 2015-10-30 16:59:01 -07:00 committed by Moxie Marlinspike
parent d0e852f19f
commit d4887e11be

View File

@ -338,7 +338,7 @@ public class ConversationItem extends LinearLayout
private void setFailedStatusIcons() { private void setFailedStatusIcons() {
statusManager.displayFailed(); statusManager.displayFailed();
dateText.setText(R.string.ConversationItem_error_not_delivered); dateText.setText(R.string.ConversationItem_error_not_delivered);
if (indicatorText != null) { if (messageRecord.isOutgoing()) {
indicatorText.setText(R.string.ConversationItem_click_for_details); indicatorText.setText(R.string.ConversationItem_click_for_details);
indicatorText.setVisibility(View.VISIBLE); indicatorText.setVisibility(View.VISIBLE);
} }
@ -351,7 +351,7 @@ public class ConversationItem extends LinearLayout
} }
private void setMinimumWidth() { private void setMinimumWidth() {
if (indicatorText != null && indicatorText.getVisibility() == View.VISIBLE && indicatorText.getText() != null) { if (indicatorText.getVisibility() == View.VISIBLE && indicatorText.getText() != null) {
final float density = getResources().getDisplayMetrics().density; final float density = getResources().getDisplayMetrics().density;
bodyBubble.setMinimumWidth(indicatorText.getText().length() * (int) (6.5 * density) + (int) (22.0 * density)); bodyBubble.setMinimumWidth(indicatorText.getText().length() * (int) (6.5 * density) + (int) (22.0 * density));
} else { } else {