Added error message for failed file transfer

This commit is contained in:
Sylvain Berfini 2018-01-12 17:07:08 +01:00
parent 370929ffad
commit 6b156200ce
2 changed files with 9 additions and 1 deletions

View file

@ -191,6 +191,7 @@
<string name="processing_image">Processing image, can take up to a few seconds depending on the size of the file</string>
<string name="displayed">Read</string>
<string name="delivered">Delivered</string>
<string name="sent">Sent</string>
<string name="resend">Resend</string>
<string name="error_opening_file">An error occurs when opening this file.</string>
<string name="conversation_information">Infos</string>
@ -273,6 +274,7 @@
<!-- Errors -->
<string name="skipable_error_service_not_ready">Warning: service is not ready</string>
<string name="error">Error</string>
<string name="file_transfer_error">File transfer error</string>
<string name="warning_wrong_destination_address">Cannot build destination address from %s</string>
<string name="error_unknown">Unknown error</string>
<string name="error_call_declined">Call declined</string>

View file

@ -192,7 +192,13 @@ public class ChatEventsAdapter extends ListSelectionAdapter implements ChatMessa
} else if (status == ChatMessage.State.NotDelivered) {
holder.imdmLayout.setVisibility(View.VISIBLE);
holder.imdmIcon.setImageResource(R.drawable.chat_error);
holder.imdmLabel.setText(R.string.resend);
holder.imdmLabel.setText(R.string.error);
holder.imdmLabel.setTextColor(mContext.getResources().getColor(R.color.colorI));
// TODO resend
} else if (status == ChatMessage.State.FileTransferError) {
holder.imdmLayout.setVisibility(View.VISIBLE);
holder.imdmIcon.setImageResource(R.drawable.chat_error);
holder.imdmLabel.setText(R.string.file_transfer_error);
holder.imdmLabel.setTextColor(mContext.getResources().getColor(R.color.colorI));
}