mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Hide emoji reactions & reply action from long press menu on chat message in not encrypted conversation (if account is in secure mode)
This commit is contained in:
parent
476aec1916
commit
8204f6d2da
2 changed files with 5 additions and 2 deletions
|
|
@ -44,12 +44,14 @@ import org.linphone.core.Address
|
|||
import org.linphone.core.ChatMessage
|
||||
import org.linphone.core.ChatMessageListenerStub
|
||||
import org.linphone.core.ChatMessageReaction
|
||||
import org.linphone.core.ChatRoom
|
||||
import org.linphone.core.Content
|
||||
import org.linphone.core.Factory
|
||||
import org.linphone.core.Player
|
||||
import org.linphone.core.PlayerListener
|
||||
import org.linphone.core.tools.Log
|
||||
import org.linphone.ui.main.contacts.model.ContactAvatarModel
|
||||
import org.linphone.ui.main.model.isInSecureMode
|
||||
import org.linphone.utils.AppUtils
|
||||
import org.linphone.utils.AudioUtils
|
||||
import org.linphone.utils.Event
|
||||
|
|
@ -96,7 +98,8 @@ class MessageModel @WorkerThread constructor(
|
|||
|
||||
val time = TimestampUtils.toString(timestamp)
|
||||
|
||||
val chatRoomIsReadOnly = chatMessage.chatRoom.isReadOnly
|
||||
val chatRoomIsReadOnly = chatMessage.chatRoom.isReadOnly ||
|
||||
(!chatMessage.chatRoom.hasCapability(ChatRoom.Capabilities.Encrypted.toInt()) && LinphoneUtils.getDefaultAccount()?.isInSecureMode() == true)
|
||||
|
||||
val groupedWithNextMessage = MutableLiveData<Boolean>()
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/menu_reply_to_chat_message"
|
||||
android:enabled="@{!model.chatRoomIsReadOnly}"
|
||||
android:visibility="@{model.chatRoomIsReadOnly ? View.GONE : View.VISIBLE}"
|
||||
android:background="@drawable/menu_item_background"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:drawableStart="@drawable/reply"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue