Revert "Do not show geo URI as message body (Cheogram)"

This reverts commit 745a8010c6.
This commit is contained in:
Arne 2023-06-22 00:54:04 +02:00
parent 1d5e1cc22b
commit 35c2394a1a
3 changed files with 4 additions and 6 deletions

View file

@ -600,8 +600,6 @@ 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();
}

View file

@ -101,7 +101,7 @@ public class ShareUtil {
final int resId;
if (message.isGeoUri()) {
resId = R.string.location;
url = message.getQuoteableBody();
url = message.getBody();
} else if (message.hasFileOnRemoteHost()) {
resId = R.string.file_url;
url = message.getFileParams().url;

View file

@ -107,7 +107,7 @@ public class GeoHelper {
final ArrayList<Intent> intents = new ArrayList<>();
final GeoPoint geoPoint;
try {
geoPoint = parseGeoPoint(message.getQuoteableBody());
geoPoint = parseGeoPoint(message.getBody());
} catch (IllegalArgumentException e) {
return intents;
}
@ -138,7 +138,7 @@ public class GeoHelper {
}
public static void view(Context context, Message message) {
final GeoPoint geoPoint = parseGeoPoint(message.getQuoteableBody());
final GeoPoint geoPoint = parseGeoPoint(message.getBody());
final String label = getLabel(context, message);
context.startActivity(geoIntent(geoPoint, label));
}
@ -151,7 +151,7 @@ public class GeoHelper {
public static boolean openInOsmAnd(Context context, Message message) {
try {
final GeoPoint geoPoint = parseGeoPoint(message.getQuoteableBody());
final GeoPoint geoPoint = parseGeoPoint(message.getBody());
final String label = getLabel(context, message);
return geoIntent(geoPoint, label).resolveActivity(context.getPackageManager()) != null;
} catch (IllegalArgumentException e) {