From eb2dfb3fb62733150776767cfc23e513588354fc Mon Sep 17 00:00:00 2001 From: Alex Hart Date: Thu, 2 Apr 2026 11:33:23 -0300 Subject: [PATCH] Fix `getViewLifecycleOwner` crash in bubble `view.post` callback. Co-authored-by: Greyson Parrelli --- .../securesms/conversation/v2/ConversationFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationFragment.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationFragment.kt index c71a2af94d..403dc45cc1 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationFragment.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationFragment.kt @@ -657,7 +657,7 @@ class ConversationFragment : if (args.conversationScreenType == ConversationScreenType.BUBBLE) { binding.root.setNavigationBarInsetOverride(0) view.post { - if (view.isAttachedToWindow) { + if (isAdded && this@ConversationFragment.view != null) { ViewCompat.requestApplyInsets(binding.root) binding.root.requestLayout() }