aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui/ConversationFragment.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-04-14 21:21:13 +0200
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-04-14 21:21:13 +0200
commit513f3c47b2aa710d205a43b63eff3301812969ce (patch)
tree7ecba2b6f6b0a8a8a118a16d86980e2559643d6b /src/eu/siacs/conversations/ui/ConversationFragment.java
parent18c3333271541a63d3ce626601661b7fc9bb7f53 (diff)
added very basic, very untested gui on the receiving side
Diffstat (limited to 'src/eu/siacs/conversations/ui/ConversationFragment.java')
-rw-r--r--src/eu/siacs/conversations/ui/ConversationFragment.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java
index 06ed41e5..d8f9ad3b 100644
--- a/src/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/eu/siacs/conversations/ui/ConversationFragment.java
@@ -209,7 +209,6 @@ public class ConversationFragment extends Fragment {
.findViewById(R.id.message_photo);
viewHolder.imageView.setImageBitmap(selfBitmap);
viewHolder.indicator = (ImageView) view.findViewById(R.id.security_indicator);
- viewHolder.image = (ImageView) view.findViewById(R.id.message_image);
break;
case RECIEVED:
view = (View) inflater.inflate(
@@ -231,6 +230,7 @@ public class ConversationFragment extends Fragment {
viewHolder = null;
break;
}
+ viewHolder.image = (ImageView) view.findViewById(R.id.message_image);
viewHolder.messageBody = (TextView) view
.findViewById(R.id.message_body);
viewHolder.time = (TextView) view
@@ -256,8 +256,13 @@ public class ConversationFragment extends Fragment {
}
if (item.getType() == Message.TYPE_IMAGE) {
viewHolder.image.setVisibility(View.VISIBLE);
- viewHolder.image.setImageBitmap(activity.xmppConnectionService.getFileBackend().getThumbnailFromMessage(item,(int) (metrics.density * 288)));
- viewHolder.messageBody.setVisibility(View.GONE);
+ if (item.getStatus() != Message.STATUS_RECIEVING) {
+ viewHolder.image.setImageBitmap(activity.xmppConnectionService.getFileBackend().getThumbnailFromMessage(item,(int) (metrics.density * 288)));
+ viewHolder.messageBody.setVisibility(View.GONE);
+ } else {
+ viewHolder.messageBody.setVisibility(View.VISIBLE);
+ viewHolder.messageBody.setText("receiving image file");
+ }
} else {
if (viewHolder.image != null) viewHolder.image.setVisibility(View.GONE);
viewHolder.messageBody.setVisibility(View.VISIBLE);