aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui/util
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-05-04 15:41:26 +0200
committerChristian Schneppe <christian@pix-art.de>2019-05-04 15:41:26 +0200
commitc0c861c90b0119f62cbadb2d19348d03c1245eaf (patch)
tree6ce45fbc60d40af834e0794018b98fb796e7daa6 /src/main/java/de/pixart/messenger/ui/util
parent5d6876e3131c620c3dbcf840c9395fe796c42a5f (diff)
wait with presence selection until attachment commit
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/util')
-rw-r--r--src/main/java/de/pixart/messenger/ui/util/Attachment.java9
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));