forked from mirror/monocles_chat
Do not show geo Uri as message body
This commit is contained in:
parent
80f6537b9f
commit
382bf3d19e
3 changed files with 5 additions and 3 deletions
|
@ -639,6 +639,8 @@ public class Message extends AbstractEntity implements AvatarService.Avatarable
|
|||
|
||||
if (spans.isEmpty() && getOob() != null) {
|
||||
return body.toString().replace(getOob().toString(), "");
|
||||
} else if (spans.isEmpty() && isGeoUri()) {
|
||||
return "";
|
||||
} else {
|
||||
return body.toString();
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ public class ShareUtil {
|
|||
final int resId;
|
||||
if (message.isGeoUri()) {
|
||||
resId = R.string.location;
|
||||
url = message.getBody();
|
||||
url = message.getQuoteableBody();
|
||||
} else if (message.hasFileOnRemoteHost()) {
|
||||
resId = R.string.file_url;
|
||||
url = message.getFileParams().url;
|
||||
|
@ -111,7 +111,7 @@ public class ShareUtil {
|
|||
resId = R.string.file_url;
|
||||
}
|
||||
if (activity.copyTextToClipboard(url, resId)) {
|
||||
ToastCompat.makeText(activity, R.string.url_copied_to_clipboard, ToastCompat.LENGTH_SHORT).show();
|
||||
Toast.makeText(activity, R.string.url_copied_to_clipboard, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ public class GeoHelper {
|
|||
final ArrayList<Intent> intents = new ArrayList<>();
|
||||
final GeoPoint geoPoint;
|
||||
try {
|
||||
geoPoint = parseGeoPoint(message.getBody());
|
||||
geoPoint = parseGeoPoint(message.getQuoteableBody());
|
||||
} catch (IllegalArgumentException e) {
|
||||
return intents;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue