Fixes FS#95: NPE when opening message details for failed file transfer
This commit is contained in:
parent
dcf951e48e
commit
556697c47e
1 changed files with 2 additions and 1 deletions
|
@ -54,6 +54,7 @@ public class MessageDetailsDialog extends AbstractAlertDialog {
|
|||
*/
|
||||
protected void displayFileInfo(View view, Message message) {
|
||||
if (message.getType() == Message.TYPE_IMAGE || message.getType() == Message.TYPE_FILE || message.getTransferable() != null) {
|
||||
Logging.d("messagedetailsfile", "File is stored in path: " + message.getRelativeFilePath());
|
||||
view.findViewById(R.id.dlgMsgDetFileTable).setVisibility(View.VISIBLE);
|
||||
if (null != message.getFileParams()) {
|
||||
Message.FileParams params = message.getFileParams();
|
||||
|
@ -139,7 +140,7 @@ public class MessageDetailsDialog extends AbstractAlertDialog {
|
|||
// Get own resource name -> What about msg written on other client?
|
||||
String me = conversation.getAccount().getJid().getResourcepart();
|
||||
// Get resource name of chat partner, if available
|
||||
String other = (message.getCounterpart().isBareJid()) ? "" : message.getCounterpart().getResourcepart();
|
||||
String other = (null == message.getCounterpart() || message.getCounterpart().isBareJid()) ? "" : message.getCounterpart().getResourcepart();
|
||||
Logging.d("MesageDialog", "Me: " + me + ", other: " + other);
|
||||
TextView sender = (TextView) view.findViewById(R.id.dlgMsgDetSender);
|
||||
TextView receipient = (TextView) view.findViewById(R.id.dlgMsgDetReceipient);
|
||||
|
|
Loading…
Reference in a new issue