fixed bug where the state of message input fragment wasn't saved because of capabilities

Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
This commit is contained in:
rapterjet2004 2024-08-19 10:12:30 -05:00 committed by sowjanyakch
parent e06f2e394b
commit 9d75550482
No known key found for this signature in database
GPG key ID: F7AA2A8B65B50220
2 changed files with 10 additions and 2 deletions

View file

@ -332,6 +332,8 @@ class ChatActivity :
}
}
private lateinit var messageInputFragment: MessageInputFragment
val typingParticipants = HashMap<String, TypingParticipant>()
var callStarted = false
@ -398,6 +400,8 @@ class ChatActivity :
setContentView(binding.root)
setupSystemColors()
messageInputFragment = MessageInputFragment()
conversationUser = currentUserProvider.currentUser.blockingGet()
handleIntent(intent)
@ -579,7 +583,7 @@ class ChatActivity :
supportFragmentManager.commit {
setReorderingAllowed(true) // optimizes out redundant replace operations
replace(R.id.fragment_container_activity_chat, MessageInputFragment())
replace(R.id.fragment_container_activity_chat, messageInputFragment)
}
joinRoomWithPassword()

View file

@ -136,9 +136,13 @@ class MessageInputFragment : Fragment() {
return binding.root
}
override fun onPause() {
super.onPause()
saveState()
}
override fun onDestroyView() {
super.onDestroyView()
saveState()
if (mentionAutocomplete != null && mentionAutocomplete!!.isPopupShowing) {
mentionAutocomplete?.dismissPopup()
}