diff options
author | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-02-02 16:05:15 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-02-02 16:05:15 +0100 |
commit | d365bbe480bdd26a042b425c45227785ab4fbf51 (patch) | |
tree | 4389b79b60d89724fd74eebf5674834888e9b436 /src/de/gultsch/chat/ui/ConversationFragment.java | |
parent | 53d9c9997a508985f0e19aba928bfa25c80ba23e (diff) |
fetching roster. fixed sending messages as type chat
Diffstat (limited to 'src/de/gultsch/chat/ui/ConversationFragment.java')
-rw-r--r-- | src/de/gultsch/chat/ui/ConversationFragment.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/de/gultsch/chat/ui/ConversationFragment.java b/src/de/gultsch/chat/ui/ConversationFragment.java index 57d4b1eb..b8edcbaf 100644 --- a/src/de/gultsch/chat/ui/ConversationFragment.java +++ b/src/de/gultsch/chat/ui/ConversationFragment.java @@ -54,7 +54,7 @@ public class ConversationFragment extends Fragment { return; Message message = new Message(conversation, chatMsg .getText().toString(), Message.ENCRYPTION_NONE); - activity.xmppConnectionService.sendMessage(message); + activity.xmppConnectionService.sendMessage(conversation.getAccount(),message); conversation.getMessages().add(message); chatMsg.setText(""); @@ -105,16 +105,12 @@ public class ConversationFragment extends Fragment { case SENT: view = (View) inflater.inflate(R.layout.message_sent, null); - Log.d("gultsch", "inflated new message_sent view"); break; case RECIEVED: view = (View) inflater.inflate( R.layout.message_recieved, null); - Log.d("gultsch", "inflated new message_recieved view"); break; } - } else { - Log.d("gultsch", "recylecd a view"); } ImageView imageView = (ImageView) view.findViewById(R.id.message_photo); if (type == RECIEVED) { @@ -128,7 +124,7 @@ public class ConversationFragment extends Fragment { imageView.setImageURI(profilePicture); } ((TextView) view.findViewById(R.id.message_body)).setText(item - .getBody()); + .getBody().trim()); TextView time = (TextView) view.findViewById(R.id.message_time); if (item.getStatus() == Message.STATUS_UNSEND) { time.setTypeface(null, Typeface.ITALIC); |