mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 08:39:22 +01:00
Fix bubble desired height calculation.
This commit is contained in:
committed by
Cody Henthorne
parent
7428e1e2ea
commit
bd121e47c8
@@ -1,17 +1,25 @@
|
||||
package org.thoughtcrime.securesms.conversation
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.core.view.WindowCompat
|
||||
import org.thoughtcrime.securesms.R
|
||||
import org.thoughtcrime.securesms.conversation.v2.ConversationActivity
|
||||
import org.thoughtcrime.securesms.util.ViewUtil
|
||||
|
||||
/**
|
||||
* Activity which encapsulates a conversation for a Bubble window.
|
||||
*
|
||||
*8
|
||||
* This activity exists so that we can override some of its manifest parameters
|
||||
* without clashing with [ConversationActivity] and provide an API-level
|
||||
* independent "is in bubble?" check.
|
||||
*/
|
||||
class BubbleConversationActivity : ConversationActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?, ready: Boolean) {
|
||||
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||
super.onCreate(savedInstanceState, ready)
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
ViewUtil.hideKeyboard(this, findViewById(R.id.fragment_container))
|
||||
|
||||
@@ -637,8 +637,14 @@ class ConversationFragment :
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
binding.toolbar.isBackInvokedCallbackEnabled = false
|
||||
|
||||
binding.root.setUseWindowTypes(args.conversationScreenType == ConversationScreenType.NORMAL && !resources.getWindowSizeClass().isSplitPane())
|
||||
if (args.conversationScreenType == ConversationScreenType.BUBBLE) {
|
||||
binding.root.setNavigationBarInsetOverride(0)
|
||||
view.post {
|
||||
ViewCompat.requestApplyInsets(binding.root)
|
||||
binding.root.requestLayout()
|
||||
}
|
||||
}
|
||||
|
||||
disposables.bindTo(viewLifecycleOwner)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user