diff options
author | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-02-11 23:55:03 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-02-11 23:55:03 +0100 |
commit | e63109215e9dda9152f0bc92bf230b652413a677 (patch) | |
tree | a9d743acde7d0b41fafc4b809d699064f76deadf /src/de/gultsch/chat/ui/ConversationFragment.java | |
parent | f6a6982bd0232fed847d4d32103a999aa6f94cd5 (diff) |
offline messages
Diffstat (limited to '')
-rw-r--r-- | src/de/gultsch/chat/ui/ConversationFragment.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/de/gultsch/chat/ui/ConversationFragment.java b/src/de/gultsch/chat/ui/ConversationFragment.java index 81dc1d26..f7513d08 100644 --- a/src/de/gultsch/chat/ui/ConversationFragment.java +++ b/src/de/gultsch/chat/ui/ConversationFragment.java @@ -60,14 +60,14 @@ public class ConversationFragment extends Fragment { activity.xmppConnectionService.sendMessage(conversation.getAccount(),message); chatMsg.setText(""); - if (conversation.getMode()==Conversation.MODE_SINGLE) { + /*if (conversation.getMode()==Conversation.MODE_SINGLE) { conversation.getMessages().add(message); messageList.add(message); - } + }*/ - activity.updateConversationList(); + //activity.updateConversationList(); - messagesView.setSelection(messageList.size() - 1); + //messagesView.setSelection(messageList.size() - 1); } }); @@ -151,9 +151,16 @@ public class ConversationFragment extends Fragment { TextView time = (TextView) view.findViewById(R.id.message_time); if (item.getStatus() == Message.STATUS_UNSEND) { time.setTypeface(null, Typeface.ITALIC); + time.setText("sending\u2026"); } else { - time.setText(UIHelper.readableTimeDifference(item + time.setTypeface(null,Typeface.NORMAL); + if ((item.getConversation().getMode()==Conversation.MODE_SINGLE)||(type != RECIEVED)) { + time.setText(UIHelper.readableTimeDifference(item .getTimeSent())); + } else { + time.setText(item.getCounterpart()+" \u00B7 "+UIHelper.readableTimeDifference(item + .getTimeSent())); + } } return view; } |