show geo uris as 'location' in overview
This commit is contained in:
parent
1a5321e41f
commit
5132cd7234
|
@ -153,7 +153,13 @@ public class UIHelper {
|
||||||
if (message.getBody().startsWith(Message.ME_COMMAND)) {
|
if (message.getBody().startsWith(Message.ME_COMMAND)) {
|
||||||
return new Pair<>(message.getBody().replaceAll("^" + Message.ME_COMMAND,
|
return new Pair<>(message.getBody().replaceAll("^" + Message.ME_COMMAND,
|
||||||
UIHelper.getMessageDisplayName(message) + " "), false);
|
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);
|
return new Pair<>(message.getBody().trim(), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -452,4 +452,6 @@
|
||||||
<string name="send_location">Send location</string>
|
<string name="send_location">Send location</string>
|
||||||
<string name="show_location">Show location</string>
|
<string name="show_location">Show location</string>
|
||||||
<string name="no_application_found_to_display_location">No application found to display location</string>
|
<string name="no_application_found_to_display_location">No application found to display location</string>
|
||||||
|
<string name="location">Location</string>
|
||||||
|
<string name="received_location">Received location</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue