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