diff options
author | steckbrief <steckbrief@chefmail.de> | 2015-11-06 20:23:43 +0100 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2015-11-06 20:23:43 +0100 |
commit | 8838a5094812e0540ccfef3334e49e1a5c1a564b (patch) | |
tree | 353f4513b8f38b77fd4219c2d92a46b0f87694ff /src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java | |
parent | b22d863c362bb6492240700c0f69f1a5d926f46b (diff) |
FileBackend splitted into several util classes for separate concerns: AvatarUtil, StreamUtil, ImageUtil. Unused imports removed.
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java b/src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java index 3fbe59f4..94cb896b 100644 --- a/src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java +++ b/src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java @@ -42,6 +42,7 @@ import java.util.NoSuchElementException; import java.util.concurrent.ConcurrentLinkedQueue; import de.thedevstack.conversationsplus.ConversationsPlusPreferences; +import de.thedevstack.conversationsplus.persistance.FileBackend; import de.thedevstack.conversationsplus.ui.dialogs.MessageDetailsDialog; import de.thedevstack.conversationsplus.ui.listeners.ConversationSwipeRefreshListener; import de.thedevstack.conversationsplus.Config; @@ -535,9 +536,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa shareIntent.putExtra(Intent.EXTRA_TEXT, message.getBody()); shareIntent.setType("text/plain"); } else { - shareIntent.putExtra(Intent.EXTRA_STREAM, - activity.xmppConnectionService.getFileBackend() - .getJingleFileUri(message)); + shareIntent.putExtra(Intent.EXTRA_STREAM, FileBackend.getJingleFileUri(message)); shareIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); String mime = message.getMimeType(); if (mime == null) { @@ -563,7 +562,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa private void resendMessage(Message message) { if (message.getType() == Message.TYPE_FILE || message.getType() == Message.TYPE_IMAGE) { - DownloadableFile file = activity.xmppConnectionService.getFileBackend().getFile(message); + DownloadableFile file = FileBackend.getFile(message); if (!file.exists()) { Toast.makeText(activity, R.string.file_deleted, Toast.LENGTH_SHORT).show(); message.setTransferable(new TransferablePlaceholder(Transferable.STATUS_DELETED)); |