diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/util')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/util/Attachment.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/util/Attachment.java b/src/main/java/de/pixart/messenger/ui/util/Attachment.java index b63510209..1eb184ca3 100644 --- a/src/main/java/de/pixart/messenger/ui/util/Attachment.java +++ b/src/main/java/de/pixart/messenger/ui/util/Attachment.java @@ -84,6 +84,15 @@ public class Attachment implements Parcelable { this.uuid = UUID.randomUUID(); } + public static boolean canBeSendInband(final List<Attachment> attachments) { + for (Attachment attachment : attachments) { + if (attachment.type != Type.LOCATION) { + return false; + } + } + return true; + } + public static List<Attachment> of(final Context context, Uri uri, Type type) { final String mime = type == Type.LOCATION ? null : MimeUtils.guessMimeTypeFromUri(context, uri); return Collections.singletonList(new Attachment(uri, type, mime)); |