aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2016-01-15 11:46:58 +0100
committersteckbrief <steckbrief@chefmail.de>2016-01-15 11:46:58 +0100
commit732de65479850776b995b1f1f913505b3c0d4cd9 (patch)
treef531ca1442dda5f0ca410c88b8b922f47f3ae1de /src
parentd9af7dca5475866a0b41c1328b1ce0dc8866c24f (diff)
parent0e2cd3e14208780c09281bf5ad05cb7d657e261a (diff)
Merge remote-tracking branch 'remotes/origin/trz/rename' into trz/rebase
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java14
-rw-r--r--src/main/res/values-de/strings.xml1
-rw-r--r--src/main/res/values/strings.xml1
3 files changed, 14 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
index ee7e46b9..c31b230e 100644
--- a/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
+++ b/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
@@ -125,7 +125,17 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> {
mLastMessage.setVisibility(View.VISIBLE);
imagePreview.setVisibility(View.GONE);
CharSequence msgText = preview.first;
- mLastMessage.setText(msgText);
+ String msgPrefix = null;
+ if (message.getStatus() == Message.STATUS_SEND
+ || message.getStatus() == Message.STATUS_SEND_DISPLAYED
+ || message.getStatus() == Message.STATUS_SEND_FAILED
+ || message.getStatus() == Message.STATUS_SEND_RECEIVED) {
+ msgPrefix = activity.getString(R.string.cplus_me);
+ } else if (conversation.getMode() == Conversation.MODE_MULTI) {
+ msgPrefix = UIHelper.getMessageDisplayName(message);
+ }
+ String lastMessagePreview = ((null == msgPrefix || msgPrefix.isEmpty()) ? "" : (msgPrefix + ": ")) + msgText;
+ mLastMessage.setText(lastMessagePreview);
if (preview.second) {
if (conversation.isRead()) {
mLastMessage.setTypeface(null, Typeface.ITALIC);
@@ -141,7 +151,7 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> {
}
}
- mTimestamp.setText(UIHelper.readableTimeDifference(activity,conversation.getLatestMessage().getTimeSent()));
+ mTimestamp.setText(UIHelper.readableTimeDifference(activity, message.getTimeSent()));
ImageView profilePicture = (ImageView) view.findViewById(R.id.conversation_image);
profilePicture.setOnLongClickListener(new ShowResourcesListDialogListener(activity, conversation.getContact()));
loadAvatar(conversation, profilePicture);
diff --git a/src/main/res/values-de/strings.xml b/src/main/res/values-de/strings.xml
index 617aedd3..22d5bc32 100644
--- a/src/main/res/values-de/strings.xml
+++ b/src/main/res/values-de/strings.xml
@@ -511,4 +511,5 @@
<string name="pref_img_file_transfer_summary">Unterordner des globalen Bilderordners, um eingehende Bilder zu speichern.</string>
<string name="pref_file_transfer_category">Dateiübertragung</string>
<string name="cplus_not_copied_to_clipboard_empty">Nichts zu kopieren.</string>
+ <string name="cplus_me">Ich</string>
</resources>
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index c3444a82..928240ad 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -544,4 +544,5 @@
<string name="pref_img_file_transfer_summary">This is the subdirectory in the pictures directory for incoming files.</string>
<string name="pref_file_transfer_category">File Transfer</string>
<string name="cplus_not_copied_to_clipboard_empty">Nothing to copy.</string>
+ <string name="cplus_me">Me</string>
</resources>