2015-09-15 22:28:27 +00:00
|
|
|
package org.thoughtcrime.securesms;
|
|
|
|
|
|
|
|
import android.support.annotation.NonNull;
|
2018-04-02 23:17:32 +00:00
|
|
|
import android.support.annotation.Nullable;
|
2018-04-27 00:03:54 +00:00
|
|
|
import android.view.View;
|
2015-09-15 22:28:27 +00:00
|
|
|
|
2018-04-27 00:03:54 +00:00
|
|
|
import org.thoughtcrime.securesms.contactshare.Contact;
|
2019-02-27 03:29:52 +00:00
|
|
|
import org.thoughtcrime.securesms.database.Address;
|
2015-09-15 22:28:27 +00:00
|
|
|
import org.thoughtcrime.securesms.database.model.MessageRecord;
|
2018-04-02 23:17:32 +00:00
|
|
|
import org.thoughtcrime.securesms.database.model.MmsMessageRecord;
|
2019-01-15 08:41:05 +00:00
|
|
|
import org.thoughtcrime.securesms.linkpreview.LinkPreview;
|
2017-10-16 20:11:42 +00:00
|
|
|
import org.thoughtcrime.securesms.mms.GlideRequests;
|
2017-08-01 15:56:00 +00:00
|
|
|
import org.thoughtcrime.securesms.recipients.Recipient;
|
2019-04-17 14:21:30 +00:00
|
|
|
import org.thoughtcrime.securesms.stickers.StickerLocator;
|
2018-06-26 17:27:44 +00:00
|
|
|
import org.whispersystems.libsignal.util.guava.Optional;
|
2015-09-15 22:28:27 +00:00
|
|
|
|
2018-04-27 00:03:54 +00:00
|
|
|
import java.util.List;
|
2015-09-15 22:28:27 +00:00
|
|
|
import java.util.Locale;
|
|
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
public interface BindableConversationItem extends Unbindable {
|
2018-06-26 17:27:44 +00:00
|
|
|
void bind(@NonNull MessageRecord messageRecord,
|
|
|
|
@NonNull Optional<MessageRecord> previousMessageRecord,
|
|
|
|
@NonNull Optional<MessageRecord> nextMessageRecord,
|
|
|
|
@NonNull GlideRequests glideRequests,
|
|
|
|
@NonNull Locale locale,
|
|
|
|
@NonNull Set<MessageRecord> batchSelected,
|
|
|
|
@NonNull Recipient recipients,
|
2019-02-01 17:06:59 +00:00
|
|
|
@Nullable String searchQuery,
|
2018-06-26 17:27:44 +00:00
|
|
|
boolean pulseHighlight);
|
2016-08-16 03:23:56 +00:00
|
|
|
|
|
|
|
MessageRecord getMessageRecord();
|
2018-04-02 23:17:32 +00:00
|
|
|
|
|
|
|
void setEventListener(@Nullable EventListener listener);
|
|
|
|
|
|
|
|
interface EventListener {
|
|
|
|
void onQuoteClicked(MmsMessageRecord messageRecord);
|
2019-01-15 08:41:05 +00:00
|
|
|
void onLinkPreviewClicked(@NonNull LinkPreview linkPreview);
|
2019-02-27 03:29:52 +00:00
|
|
|
void onMoreTextClicked(@NonNull Address conversationAddress, long messageId, boolean isMms);
|
2019-04-17 14:21:30 +00:00
|
|
|
void onStickerClicked(@NonNull StickerLocator stickerLocator);
|
2018-04-27 00:03:54 +00:00
|
|
|
void onSharedContactDetailsClicked(@NonNull Contact contact, @NonNull View avatarTransitionView);
|
|
|
|
void onAddToContactsClicked(@NonNull Contact contact);
|
|
|
|
void onMessageSharedContactClicked(@NonNull List<Recipient> choices);
|
|
|
|
void onInviteSharedContactClicked(@NonNull List<Recipient> choices);
|
2018-04-02 23:17:32 +00:00
|
|
|
}
|
2015-09-15 22:28:27 +00:00
|
|
|
}
|