diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java index 37dd32b4c..9f09531e1 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java @@ -1,6 +1,7 @@ package de.pixart.messenger.ui.adapter; import android.Manifest; +import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.Intent; import android.content.SharedPreferences; @@ -71,6 +72,7 @@ import de.pixart.messenger.persistance.FileBackend; import de.pixart.messenger.services.AudioPlayer; import de.pixart.messenger.services.MessageArchiveService; import de.pixart.messenger.services.NotificationService; +import de.pixart.messenger.ui.ConversationActivity; import de.pixart.messenger.ui.ConversationFragment; import de.pixart.messenger.ui.ShowFullscreenMessageActivity; import de.pixart.messenger.ui.XmppActivity; @@ -197,6 +199,10 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie this.mOnContactPictureLongClickedListener = listener; } + public Activity getActivity() { + return activity; + } + public void setOnQuoteListener(OnQuoteListener listener) { this.onQuoteListener = listener; } @@ -1058,6 +1064,10 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie audioPlayer.stop(); } + public void startStopPending() { + audioPlayer.startStopPending(); + } + public void openDownloadable(Message message) { if (ContextCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { ConversationFragment.registerPendingMessage(activity, message); |