aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/utils/UIHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu/siacs/conversations/utils/UIHelper.java')
-rw-r--r--src/main/java/eu/siacs/conversations/utils/UIHelper.java11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/main/java/eu/siacs/conversations/utils/UIHelper.java b/src/main/java/eu/siacs/conversations/utils/UIHelper.java
index 2f96a83a..19a8653f 100644
--- a/src/main/java/eu/siacs/conversations/utils/UIHelper.java
+++ b/src/main/java/eu/siacs/conversations/utils/UIHelper.java
@@ -199,16 +199,7 @@ public class UIHelper {
if (message.getType() == Message.TYPE_IMAGE) {
return context.getString(R.string.image);
}
- final String path = message.getRelativeFilePath();
- if (path == null) {
- return "";
- }
- final String mime;
- try {
- mime = URLConnection.guessContentTypeFromName(path.replace("#",""));
- } catch (final StringIndexOutOfBoundsException ignored) {
- return context.getString(R.string.file);
- }
+ final String mime = message.getMimeType();
if (mime == null) {
return context.getString(R.string.file);
} else if (mime.startsWith("audio/")) {