Fixed lost subject when creating a group chat room and navigating back to add more participants
This commit is contained in:
parent
1bc34be8d8
commit
46d25ce4a9
2 changed files with 8 additions and 0 deletions
|
@ -133,6 +133,7 @@ class GroupInfoFragment : SecureFragment<ChatRoomGroupInfoFragmentBinding>() {
|
|||
list.add(participant.participant.address)
|
||||
}
|
||||
sharedViewModel.chatRoomParticipants.value = list
|
||||
sharedViewModel.chatRoomSubject = viewModel.subject.value.orEmpty()
|
||||
|
||||
val args = Bundle()
|
||||
args.putBoolean("createGroup", true)
|
||||
|
@ -183,6 +184,11 @@ class GroupInfoFragment : SecureFragment<ChatRoomGroupInfoFragmentBinding>() {
|
|||
|
||||
viewModel.participants.value = list
|
||||
}
|
||||
|
||||
if (sharedViewModel.chatRoomSubject.isNotEmpty()) {
|
||||
viewModel.subject.value = sharedViewModel.chatRoomSubject
|
||||
sharedViewModel.chatRoomSubject = ""
|
||||
}
|
||||
}
|
||||
|
||||
private fun showMeAdminStateChanged(isMeAdmin: Boolean) {
|
||||
|
|
|
@ -54,6 +54,8 @@ class SharedMainViewModel : ViewModel() {
|
|||
|
||||
val chatRoomParticipants = MutableLiveData<ArrayList<Address>>()
|
||||
|
||||
var chatRoomSubject: String = ""
|
||||
|
||||
/* Contacts */
|
||||
|
||||
val selectedContact = MutableLiveData<Contact>()
|
||||
|
|
Loading…
Reference in a new issue