aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/ui')
-rw-r--r--src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java2
-rw-r--r--src/eu/siacs/conversations/ui/adapter/MessageAdapter.java7
2 files changed, 7 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java b/src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
index bd37f7fcb..20c7bee21 100644
--- a/src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
+++ b/src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
@@ -92,6 +92,8 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> {
mLastMessage.setText(R.string.receiving_image);
} else if (d.getStatus() == Downloadable.STATUS_OFFER) {
mLastMessage.setText(R.string.image_offered_for_download);
+ } else if (d.getStatus() == Downloadable.STATUS_OFFER_CHECK_FILESIZE) {
+ mLastMessage.setText(R.string.image_offered_for_download);
} else if (d.getStatus() == Downloadable.STATUS_DELETED) {
mLastMessage.setText(R.string.image_file_deleted);
} else {
diff --git a/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
index 6b2a00949..db783b7f6 100644
--- a/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
+++ b/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
@@ -264,10 +264,11 @@ public class MessageAdapter extends ArrayAdapter<Message> {
}
private void displayDownloadableMessage(ViewHolder viewHolder,
- final Message message) {
+ final Message message, int resid) {
viewHolder.image.setVisibility(View.GONE);
viewHolder.messageBody.setVisibility(View.GONE);
viewHolder.download_button.setVisibility(View.VISIBLE);
+ viewHolder.download_button.setText(resid);
viewHolder.download_button.setOnClickListener(new OnClickListener() {
@Override
@@ -493,7 +494,9 @@ public class MessageAdapter extends ArrayAdapter<Message> {
&& d.getStatus() == Downloadable.STATUS_DELETED) {
displayInfoMessage(viewHolder, R.string.image_file_deleted);
} else if (d != null && d.getStatus() == Downloadable.STATUS_OFFER) {
- displayDownloadableMessage(viewHolder, item);
+ displayDownloadableMessage(viewHolder, item,R.string.download_image);
+ } else if (d != null && d.getStatus() == Downloadable.STATUS_OFFER_CHECK_FILESIZE) {
+ displayDownloadableMessage(viewHolder, item,R.string.check_image_filesize);
} else if ((item.getEncryption() == Message.ENCRYPTION_DECRYPTED)
|| (item.getEncryption() == Message.ENCRYPTION_NONE)
|| (item.getEncryption() == Message.ENCRYPTION_OTR)) {