Attach delegate

This commit is contained in:
charles 2022-11-04 09:03:54 +11:00
parent 290e646679
commit 2816377e34
2 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,8 @@ class ConversationActionBarView : LinearLayout {
mediator.attach()
}
fun bind(threadId: Long, recipient: Recipient, glide: GlideRequests) {
fun bind(threadId: Long, recipient: Recipient, glide: GlideRequests, delegate: ConversationActionBarDelegate) {
this.delegate = delegate
binding.conversationTitleView.text = when {
recipient.isLocalNumber -> context.getString(R.string.note_to_self)
else -> recipient.toShortString()

View File

@ -87,7 +87,6 @@ import org.thoughtcrime.securesms.audio.AudioRecorder
import org.thoughtcrime.securesms.contacts.SelectContactsActivity.Companion.selectedContactsKey
import org.thoughtcrime.securesms.contactshare.SimpleTextWatcher
import org.thoughtcrime.securesms.conversation.ConversationActionBarDelegate
import org.thoughtcrime.securesms.conversation.ConversationSetting
import org.thoughtcrime.securesms.conversation.expiration.ExpirationSettingsActivity
import org.thoughtcrime.securesms.conversation.v2.ConversationReactionOverlay.OnActionSelectedListener
import org.thoughtcrime.securesms.conversation.v2.ConversationReactionOverlay.OnReactionSelectedListener
@ -455,7 +454,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
actionBar.title = ""
actionBar.setDisplayHomeAsUpEnabled(true)
actionBar.setHomeButtonEnabled(true)
binding!!.toolbarContent.bind(viewModel.threadId, recipient, glide)
binding!!.toolbarContent.bind(viewModel.threadId, recipient, glide, this)
}
// called from onCreate