aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/ui/adapter
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-12-06 18:23:59 +0100
committerDaniel Gultsch <daniel@gultsch.de>2015-12-07 13:24:41 +0100
commitc3e8fb3446237dee34bf49436076a10d07e2efdf (patch)
tree881bf04d964be1ebe99e1a4a0aafc5de53c46726 /src/main/java/eu/siacs/conversations/ui/adapter
parent739a2d609d15be7472575adb937e9a0b164dd4a9 (diff)
request storage permission when needed on Android 6.0
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui/adapter')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
index f9f6e672b..1d906b294 100644
--- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
+++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
@@ -352,7 +352,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
@Override
public void onClick(View v) {
- startDownloadable(message);
+ activity.startDownloadable(message);
}
});
viewHolder.download_button.setOnLongClickListener(openContextMenu);
@@ -602,18 +602,6 @@ public class MessageAdapter extends ArrayAdapter<Message> {
return view;
}
- public void startDownloadable(Message message) {
- Transferable transferable = message.getTransferable();
- if (transferable != null) {
- if (!transferable.start()) {
- Toast.makeText(activity, R.string.not_connected_try_again,
- Toast.LENGTH_SHORT).show();
- }
- } else if (message.treatAsDownloadable() != Message.Decision.NEVER) {
- activity.xmppConnectionService.getHttpConnectionManager().createNewDownloadConnection(message, true);
- }
- }
-
public void openDownloadable(Message message) {
DownloadableFile file = activity.xmppConnectionService.getFileBackend().getFile(message);
if (!file.exists()) {