mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed leave group not hiding send message area
This commit is contained in:
parent
ef47624b9d
commit
6f8469eb0b
2 changed files with 8 additions and 6 deletions
|
|
@ -129,6 +129,7 @@ class ConversationInfoFragment : SlidingPaneChildFragment() {
|
|||
viewModel.groupLeftEvent.observe(viewLifecycleOwner) {
|
||||
it.consume {
|
||||
Log.i("$TAG Group has been left, leaving conversation info...")
|
||||
sharedViewModel.forceRefreshConversationInfo.value = Event(true)
|
||||
goBack()
|
||||
val message = getString(R.string.toast_group_conversation_left)
|
||||
(requireActivity() as MainActivity).showGreenToast(
|
||||
|
|
|
|||
|
|
@ -505,12 +505,6 @@ class ConversationViewModel @UiThread constructor() : ViewModel() {
|
|||
scrollingPosition = SCROLLING_POSITION_NOT_SET
|
||||
computeComposingLabel()
|
||||
|
||||
val empty = chatRoom.hasCapability(ChatRoom.Capabilities.Conference.toInt()) && chatRoom.participants.isEmpty()
|
||||
val readOnly = chatRoom.isReadOnly || empty
|
||||
isReadOnly.postValue(readOnly)
|
||||
if (readOnly) {
|
||||
Log.w("$TAG Conversation with subject [${chatRoom.subject}] is read only!")
|
||||
}
|
||||
isEndToEndEncrypted.postValue(
|
||||
chatRoom.hasCapability(ChatRoom.Capabilities.Encrypted.toInt())
|
||||
)
|
||||
|
|
@ -529,6 +523,13 @@ class ConversationViewModel @UiThread constructor() : ViewModel() {
|
|||
val group = LinphoneUtils.isChatRoomAGroup(chatRoom)
|
||||
isGroup.postValue(group)
|
||||
|
||||
val empty = chatRoom.hasCapability(ChatRoom.Capabilities.Conference.toInt()) && chatRoom.participants.isEmpty()
|
||||
val readOnly = chatRoom.isReadOnly || empty
|
||||
isReadOnly.postValue(readOnly)
|
||||
if (readOnly) {
|
||||
Log.w("$TAG Conversation with subject [${chatRoom.subject}] is read only!")
|
||||
}
|
||||
|
||||
subject.postValue(chatRoom.subject)
|
||||
|
||||
val friends = arrayListOf<Friend>()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue