mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 19:49:33 +01:00
Merge pull request #4095 from nextcloud/issue-4094-message-input-fragment-fix
Messages are no longer lost in between lifecycle events
This commit is contained in:
commit
1f66add36b
@ -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()
|
||||
|
@ -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()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user