aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-04-12 19:58:10 +0200
committerChristian Schneppe <christian@pix-art.de>2018-04-12 19:58:10 +0200
commit477312ec289cf6e8afdd21cb5e56eec2d5215131 (patch)
treee208a0ded27244ca48f889f1ea478eb7e5d5b100 /src
parent07a20550fcb19095bd00d61dd101ae72073455fd (diff)
fix choose image
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
index 70f88b227..e34bebcec 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
@@ -994,18 +994,17 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
selectPresenceToAttachFile(choice);
break;
case ATTACHMENT_CHOICE_CHOOSE_IMAGE:
- List<Uri> imageUris = AttachmentTool.extractUriFromIntent(data);
- int ImageUrisCount = imageUris.size();
- if (activity.xmppConnectionServiceBound) {
- if (ImageUrisCount == 1) {
- Uri uri = imageUris.get(0);
- Log.d(Config.LOGTAG, "ConversationsActivity.onActivityResult() - attaching image to conversations. CHOOSE_IMAGE");
- attachImageToConversation(conversation, uri, false);
- } else {
- for (Iterator<Uri> i = imageUris.iterator(); i.hasNext(); i.remove()) {
- Log.d(Config.LOGTAG, "ConversationsActivity.onActivityResult() - attaching images to conversations. CHOOSE_IMAGES");
- attachImagesToConversation(conversation, i.next());
- }
+ final List<Uri> imageUris = AttachmentTool.extractUriFromIntent(data);
+ final int ImageUrisCount = imageUris.size();
+ Log.d(Config.LOGTAG, "ConversationsActivity.onActivityResult() - attaching image - number of uris: " + ImageUrisCount);
+ if (ImageUrisCount == 1) {
+ Uri uri = imageUris.get(0);
+ Log.d(Config.LOGTAG, "ConversationsActivity.onActivityResult() - attaching image to conversations. CHOOSE_IMAGE");
+ attachImageToConversation(conversation, uri, false);
+ } else {
+ for (Iterator<Uri> i = imageUris.iterator(); i.hasNext(); i.remove()) {
+ Log.d(Config.LOGTAG, "ConversationsActivity.onActivityResult() - attaching images to conversations. CHOOSE_IMAGES");
+ attachImagesToConversation(conversation, i.next());
}
}
break;
@@ -2113,8 +2112,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
setSelection(pos);
}
}
- // todo add swipe listener --> causes strange scrolling in chats
- //this.binding.messagesView.setOnTouchListener(new OnSwipeTouchListener(getContext()) {
+
gesturesDetector.setOnFingerGestureListener(new SimpleFingerGestures.OnFingerGestureListener() {
@Override
public boolean onSwipeUp(int fingers, long gestureDuration, double gestureDistance) {