aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-02-28 19:35:01 +0100
committerChristian Schneppe <christian@pix-art.de>2017-02-28 19:35:01 +0100
commit71e5ae271f6739dee228aee92a6105e39bc74d1a (patch)
treee45e37e6818f110c939817f4d63f9390d0ec8408 /src/main/java/de/pixart/messenger
parent3b4949fc5038af87ce08b2bf553d4c3a17d8240f (diff)
correct date for first message / message at top
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
index 01dbfb66e..19bee36ba 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
@@ -1281,7 +1281,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
protected void updateDateBubbles() {
synchronized (this.messageList) {
final int max = this.messageList.size();
- if (max == 0 || (max <= 1 && showLoadMoreMessages(conversation))){
+ if (max == 0 || (max <= 1 && showLoadMoreMessages(conversation))) {
this.messageList.add(0, Message.createDateMessage(conversation, getString(R.string.start_chatting)));
} else if ((max > 0 && !showLoadMoreMessages(conversation)) || (max > 1 && showLoadMoreMessages(conversation))) {
for (int i = (max - 1); i > 0; --i) {
@@ -1297,7 +1297,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
}
first = last;
}
- String date = sdf.format(this.messageList.get(max - 1).getTimeSent());
+ String date = sdf.format(this.messageList.get(0).getTimeSent());
if (today.equals(date)) {
date = getString(R.string.today);
}