diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/utils')
-rw-r--r-- | src/main/java/de/pixart/messenger/utils/GeoHelper.java | 4 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/utils/UIHelper.java | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/main/java/de/pixart/messenger/utils/GeoHelper.java b/src/main/java/de/pixart/messenger/utils/GeoHelper.java index f4fd8e22a..909912966 100644 --- a/src/main/java/de/pixart/messenger/utils/GeoHelper.java +++ b/src/main/java/de/pixart/messenger/utils/GeoHelper.java @@ -17,10 +17,6 @@ import de.pixart.messenger.entities.Message; public class GeoHelper { public static Pattern GEO_URI = Pattern.compile("geo:([\\-0-9.]+),([\\-0-9.]+)(?:,([\\-0-9.]+))?(?:\\?(.*))?", Pattern.CASE_INSENSITIVE); - public static boolean isGeoUri(String body) { - return body != null && GEO_URI.matcher(body).matches(); - } - public static String MapPreviewUri(Message message) { Matcher matcher = GEO_URI.matcher(message.getBody()); if (!matcher.matches()) { diff --git a/src/main/java/de/pixart/messenger/utils/UIHelper.java b/src/main/java/de/pixart/messenger/utils/UIHelper.java index 955b7db10..0049a2aa8 100644 --- a/src/main/java/de/pixart/messenger/utils/UIHelper.java +++ b/src/main/java/de/pixart/messenger/utils/UIHelper.java @@ -205,13 +205,13 @@ public class UIHelper { if (body.startsWith(Message.ME_COMMAND)) { return new Pair<>(body.replaceAll("^" + Message.ME_COMMAND, UIHelper.getMessageDisplayName(message) + " "), false); - } else if (GeoHelper.isGeoUri(message.getBody())) { + } else if (message.isGeoUri()) { 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 if (message.bodyIsXmpp()) { + } else if (message.isXmppUri()) { if (message.getStatus() == Message.STATUS_RECEIVED) { return new Pair<>(context.getString(R.string.received_contact), true); } else { |