aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/utils
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2015-03-10 17:20:50 +0100
committeriNPUTmice <daniel@gultsch.de>2015-03-10 17:20:50 +0100
commit5132cd723476b6f612cf103b927e1fcf869cb039 (patch)
tree0e9817071f3dc2c790fbd487397049ec759904e5 /src/main/java/eu/siacs/conversations/utils
parent1a5321e41f8ff18356d27a54078a6d742826473f (diff)
show geo uris as 'location' in overview
Diffstat (limited to 'src/main/java/eu/siacs/conversations/utils')
-rw-r--r--src/main/java/eu/siacs/conversations/utils/UIHelper.java8
1 files changed, 7 insertions, 1 deletions
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);
}
}