From 5132cd723476b6f612cf103b927e1fcf869cb039 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Tue, 10 Mar 2015 17:20:50 +0100 Subject: show geo uris as 'location' in overview --- src/main/java/eu/siacs/conversations/utils/UIHelper.java | 8 +++++++- src/main/res/values/strings.xml | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/eu/siacs/conversations/utils/UIHelper.java b/src/main/java/eu/siacs/conversations/utils/UIHelper.java index e36c169b..c3195d86 100644 --- a/src/main/java/eu/siacs/conversations/utils/UIHelper.java +++ b/src/main/java/eu/siacs/conversations/utils/UIHelper.java @@ -153,7 +153,13 @@ public class UIHelper { if (message.getBody().startsWith(Message.ME_COMMAND)) { return new Pair<>(message.getBody().replaceAll("^" + Message.ME_COMMAND, UIHelper.getMessageDisplayName(message) + " "), false); - } else { + } else if (GeoHelper.isGeoUri(message.getBody())) { + if (message.getStatus() == Message.STATUS_RECEIVED) { + return new Pair<>(context.getString(R.string.received_location),true); + } else { + return new Pair<>(context.getString(R.string.location), true); + } + } else{ return new Pair<>(message.getBody().trim(), false); } } diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 316fbb8c..8ebe58ca 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -452,4 +452,6 @@ Send location Show location No application found to display location + Location + Received location -- cgit v1.2.3