aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/ui
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-11 23:55:03 +0100
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-11 23:55:03 +0100
commite63109215e9dda9152f0bc92bf230b652413a677 (patch)
treea9d743acde7d0b41fafc4b809d699064f76deadf /src/de/gultsch/chat/ui
parentf6a6982bd0232fed847d4d32103a999aa6f94cd5 (diff)
offline messages
Diffstat (limited to 'src/de/gultsch/chat/ui')
-rw-r--r--src/de/gultsch/chat/ui/ConversationFragment.java17
-rw-r--r--src/de/gultsch/chat/ui/NewConversationActivity.java2
2 files changed, 12 insertions, 7 deletions
diff --git a/src/de/gultsch/chat/ui/ConversationFragment.java b/src/de/gultsch/chat/ui/ConversationFragment.java
index 81dc1d265..f7513d08b 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;
}
diff --git a/src/de/gultsch/chat/ui/NewConversationActivity.java b/src/de/gultsch/chat/ui/NewConversationActivity.java
index d86808417..a41e3e39d 100644
--- a/src/de/gultsch/chat/ui/NewConversationActivity.java
+++ b/src/de/gultsch/chat/ui/NewConversationActivity.java
@@ -252,7 +252,6 @@ public class NewConversationActivity extends XmppActivity {
this.accounts = xmppConnectionService.getAccounts();
this.rosterContacts.clear();
for (int i = 0; i < accounts.size(); ++i) {
- if (accounts.get(i).getStatus() == Account.STATUS_ONLINE) {
xmppConnectionService.getRoster(accounts.get(i),
new OnRosterFetchedListener() {
@@ -271,7 +270,6 @@ public class NewConversationActivity extends XmppActivity {
});
}
}
- }
@Override
public boolean onCreateOptionsMenu(Menu menu) {