aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/ui')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/ui/adapter/MessageAdapter.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/adapter/MessageAdapter.java b/src/main/java/de/thedevstack/conversationsplus/ui/adapter/MessageAdapter.java
index 1d8af20c..09db28d0 100644
--- a/src/main/java/de/thedevstack/conversationsplus/ui/adapter/MessageAdapter.java
+++ b/src/main/java/de/thedevstack/conversationsplus/ui/adapter/MessageAdapter.java
@@ -281,9 +281,9 @@ public class MessageAdapter extends ArrayAdapter<Message> {
if (message.getBody() != null) {
final String nick = UIHelper.getMessageDisplayName(message);
String body;
- try {
- body = message.getBody().replaceAll("^" + Message.ME_COMMAND, nick + " ");
- } catch (ArrayIndexOutOfBoundsException e) {
+ if (message.hasMeCommand()) {
+ body = message.getBodyReplacedMeCommand(nick);
+ } else {
body = message.getBody();
}
final SpannableString formattedBody = new SpannableString(body);