Prepared listener when clicking on disabled conversation warning

This commit is contained in:
Sylvain Berfini 2024-04-24 14:09:27 +02:00
parent 502c7f9fc1
commit 33865b469c
2 changed files with 9 additions and 0 deletions

View file

@ -87,6 +87,7 @@ import org.linphone.ui.main.chat.viewmodel.ConversationViewModel
import org.linphone.ui.main.chat.viewmodel.ConversationViewModel.Companion.SCROLLING_POSITION_NOT_SET
import org.linphone.ui.main.chat.viewmodel.SendMessageInConversationViewModel
import org.linphone.ui.main.fragment.SlidingPaneChildFragment
import org.linphone.ui.main.settings.fragment.AccountProfileFragmentDirections
import org.linphone.utils.Event
import org.linphone.utils.FileUtils
import org.linphone.utils.RecyclerViewHeaderDecoration
@ -547,6 +548,10 @@ class ConversationFragment : SlidingPaneChildFragment() {
showEndToEndEncryptionDetailsBottomSheet()
}
binding.setWarningConversationDisabledClickListener {
// TODO: go to account profile mode fragment
}
sendMessageViewModel.emojiToAddEvent.observe(viewLifecycleOwner) {
it.consume { emoji ->
binding.sendArea.messageToSend.addCharacterAtPosition(emoji)

View file

@ -26,6 +26,9 @@
<variable
name="endToEndEncryptedEventClickListener"
type="View.OnClickListener" />
<variable
name="warningConversationDisabledClickListener"
type="View.OnClickListener" />
<variable
name="viewModel"
type="org.linphone.ui.main.chat.viewmodel.ConversationViewModel" />
@ -272,6 +275,7 @@
<include
style="@style/default_text_style"
android:id="@+id/warning_disabled_not_secured"
android:onClick="@{warningConversationDisabledClickListener}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
layout="@layout/chat_conversation_send_area_disabled_unsecured_warning"