mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Do not consider chat room as read-only if empty
This commit is contained in:
parent
a4c897b47d
commit
4f0ca4adca
2 changed files with 3 additions and 6 deletions
|
|
@ -481,8 +481,7 @@ class ConversationInfoViewModel @UiThread constructor() : AbstractConversationVi
|
|||
chatRoom.hasCapability(ChatRoom.Capabilities.Encrypted.toInt())
|
||||
)
|
||||
|
||||
val empty = chatRoom.hasCapability(ChatRoom.Capabilities.Conference.toInt()) && chatRoom.participants.isEmpty()
|
||||
val readOnly = chatRoom.isReadOnly || empty
|
||||
val readOnly = chatRoom.isReadOnly
|
||||
isReadOnly.postValue(readOnly)
|
||||
if (readOnly) {
|
||||
Log.w("$TAG Conversation with subject [${chatRoom.subject}] is read only!")
|
||||
|
|
|
|||
|
|
@ -583,11 +583,9 @@ class ConversationViewModel @UiThread constructor() : AbstractConversationViewMo
|
|||
val empty =
|
||||
chatRoom.hasCapability(ChatRoom.Capabilities.Conference.toInt()) && chatRoom.participants.isEmpty()
|
||||
if (empty) {
|
||||
Log.w(
|
||||
"$TAG Conversation has conference capability but has no participants, will be considered as read only!"
|
||||
)
|
||||
Log.w("$TAG Conversation has conference capability but has no participants!")
|
||||
}
|
||||
val readOnly = chatRoom.isReadOnly || empty
|
||||
val readOnly = chatRoom.isReadOnly
|
||||
isReadOnly.postValue(readOnly)
|
||||
if (readOnly) {
|
||||
Log.w("$TAG Conversation with subject [${chatRoom.subject}] is read only!")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue