aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-06-04 22:35:08 +0200
committeriNPUTmice <daniel@gultsch.de>2014-06-04 22:35:08 +0200
commit9a448f822fed219e79cfa5e937ee114de701adff (patch)
tree7d54870f450ef89e3c519e5a8a78803311d98abb /src/eu
parent83e919f8afbb167b7e32e9e9ff246d09e291b58b (diff)
image provider path name now with .webp ending
Diffstat (limited to 'src/eu')
-rw-r--r--src/eu/siacs/conversations/services/ImageProvider.java7
-rw-r--r--src/eu/siacs/conversations/ui/ConversationFragment.java2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/eu/siacs/conversations/services/ImageProvider.java b/src/eu/siacs/conversations/services/ImageProvider.java
index 798a4e25e..80cfbd95c 100644
--- a/src/eu/siacs/conversations/services/ImageProvider.java
+++ b/src/eu/siacs/conversations/services/ImageProvider.java
@@ -36,7 +36,9 @@ public class ImageProvider extends ContentProvider {
throw new FileNotFoundException();
}
String conversationUuid = uuidsSplited[1];
- String messageUuid = uuidsSplited[2];
+ String messageUuid = uuidsSplited[2].split("\\.")[0];
+
+ Log.d("xmppService","messageUuid="+messageUuid);
Conversation conversation = databaseBackend
.findConversationByUuid(conversationUuid);
@@ -113,7 +115,8 @@ public class ImageProvider extends ContentProvider {
.parse("content://eu.siacs.conversations.images/"
+ message.getConversationUuid()
+ "/"
- + message.getUuid());
+ + message.getUuid()
+ + ".webp");
}
public static Uri getIncomingContentUri() {
diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java
index 5607c6e48..adcf92586 100644
--- a/src/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/eu/siacs/conversations/ui/ConversationFragment.java
@@ -342,7 +342,7 @@ public class ConversationFragment extends Fragment {
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_STREAM, ImageProvider.getContentUri(message));
- shareIntent.setType("image/*");
+ shareIntent.setType("image/webp");
startActivity(Intent.createChooser(shareIntent, getText(R.string.share_with)));
return true;
}