aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/ui/ConversationFragment.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-01 15:07:20 +0100
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-01 15:07:20 +0100
commit53d9c9997a508985f0e19aba928bfa25c80ba23e (patch)
tree5e79bfe04db8d51091bcf9b94baa979217e9d542 /src/de/gultsch/chat/ui/ConversationFragment.java
parent43531113b798cda6b2f76257641f38b0af986437 (diff)
more cleanup. more listeners
Diffstat (limited to '')
-rw-r--r--src/de/gultsch/chat/ui/ConversationFragment.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/de/gultsch/chat/ui/ConversationFragment.java b/src/de/gultsch/chat/ui/ConversationFragment.java
index c3b73ac5..57d4b1eb 100644
--- a/src/de/gultsch/chat/ui/ConversationFragment.java
+++ b/src/de/gultsch/chat/ui/ConversationFragment.java
@@ -116,13 +116,16 @@ public class ConversationFragment extends Fragment {
} else {
Log.d("gultsch", "recylecd a view");
}
+ ImageView imageView = (ImageView) view.findViewById(R.id.message_photo);
if (type == RECIEVED) {
- ((ImageView) view.findViewById(R.id.message_photo))
- .setImageURI(item.getConversation()
- .getProfilePhotoUri());
+ Uri uri = item.getConversation().getProfilePhotoUri();
+ if (uri!=null) {
+ imageView.setImageURI(uri);
+ } else {
+ imageView.setImageBitmap(Beautifier.getUnknownContactPicture(item.getConversation().getName(), 200));
+ }
} else {
- ((ImageView) view.findViewById(R.id.message_photo))
- .setImageURI(profilePicture);
+ imageView.setImageURI(profilePicture);
}
((TextView) view.findViewById(R.id.message_body)).setText(item
.getBody());