From 10acb07f82111066f902272cc4288adbe6448b84 Mon Sep 17 00:00:00 2001 From: wch423 Date: Thu, 29 Jan 2026 18:07:24 +0100 Subject: [PATCH 1/7] Make device messages and subscribed channels edge to edge --- .../java/org/thoughtcrime/securesms/ConversationActivity.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java b/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java index b11340984..473c7b9d3 100644 --- a/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java @@ -995,6 +995,10 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity if(chatId == DcChat.DC_CHAT_NO_CHAT) throw new IllegalStateException("can't display a conversation for no chat."); dcChat = DcHelper.getContext(context).getChat(chatId); + if (dcChat.isDeviceTalk() || + isMultiUser() && dcChat.isInBroadcast()) { + ViewUtil.applyWindowInsets(findViewById(R.id.root_layout), true, false, true, false); + } recipient = new Recipient(this, dcChat); glideRequests = GlideApp.with(this); From 93f12e7367901e09c4d003700e2b01c22516b591 Mon Sep 17 00:00:00 2001 From: wch423 Date: Thu, 29 Jan 2026 21:43:11 +0100 Subject: [PATCH 2/7] Make message list respect bottom bar height --- .../securesms/ConversationActivity.java | 5 +++-- .../securesms/ConversationFragment.java | 20 ++++++++++++++++++- src/main/res/layout/conversation_fragment.xml | 1 + 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java b/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java index 473c7b9d3..015dfdf02 100644 --- a/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java @@ -995,9 +995,10 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity if(chatId == DcChat.DC_CHAT_NO_CHAT) throw new IllegalStateException("can't display a conversation for no chat."); dcChat = DcHelper.getContext(context).getChat(chatId); - if (dcChat.isDeviceTalk() || - isMultiUser() && dcChat.isInBroadcast()) { + if (dcChat.isDeviceTalk() || dcChat.isInBroadcast()) { ViewUtil.applyWindowInsets(findViewById(R.id.root_layout), true, false, true, false); + ViewUtil.applyWindowInsets(findViewById(R.id.fragment_content), false, true, false, true); + fragment.hideBottomDivider(); } recipient = new Recipient(this, dcChat); glideRequests = GlideApp.with(this); diff --git a/src/main/java/org/thoughtcrime/securesms/ConversationFragment.java b/src/main/java/org/thoughtcrime/securesms/ConversationFragment.java index 30832749d..685d8e8b2 100644 --- a/src/main/java/org/thoughtcrime/securesms/ConversationFragment.java +++ b/src/main/java/org/thoughtcrime/securesms/ConversationFragment.java @@ -100,6 +100,7 @@ public class ConversationFragment extends MessageSelectorFragment private StickyHeaderDecoration dateDecoration; private View scrollToBottomButton; private View floatingLocationButton; + private View bottomDivider; private AddReactionView addReactionView; private TextView noMessageTextView; private Timer reloadTimer; @@ -107,8 +108,9 @@ public class ConversationFragment extends MessageSelectorFragment public boolean isPaused; private Debouncer markseenDebouncer; private Rpc rpc; + private boolean pendingHideBottomDivider; - @Override + @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); rpc = DcHelper.getRpc(getContext()); @@ -140,6 +142,7 @@ public class ConversationFragment extends MessageSelectorFragment floatingLocationButton = ViewUtil.findById(view, R.id.floating_location_button); addReactionView = ViewUtil.findById(view, R.id.add_reaction_view); noMessageTextView = ViewUtil.findById(view, R.id.no_messages_text_view); + bottomDivider = ViewUtil.findById(view, R.id.bottom_divider); scrollToBottomButton.setOnClickListener(v -> scrollToBottom()); @@ -158,6 +161,11 @@ public class ConversationFragment extends MessageSelectorFragment // with hardware layers, drawing may result in errors as "OpenGLRenderer: Path too large to be rendered into a texture" list.setLayerType(View.LAYER_TYPE_SOFTWARE, null); + if (pendingHideBottomDivider) { + bottomDivider.setVisibility(View.GONE); + pendingHideBottomDivider = false; + } + return view; } @@ -196,6 +204,16 @@ public class ConversationFragment extends MessageSelectorFragment } } + public void hideBottomDivider() { + if (bottomDivider != null) { + bottomDivider.setVisibility(View.GONE); + pendingHideBottomDivider = false; + } + else { + pendingHideBottomDivider = true; + } + } + @Override public void onDestroy() { DcHelper.getEventCenter(getContext()).removeObservers(this); diff --git a/src/main/res/layout/conversation_fragment.xml b/src/main/res/layout/conversation_fragment.xml index c42125043..3e54caac7 100644 --- a/src/main/res/layout/conversation_fragment.xml +++ b/src/main/res/layout/conversation_fragment.xml @@ -27,6 +27,7 @@ /> Date: Tue, 3 Feb 2026 19:38:55 +0100 Subject: [PATCH 3/7] Allow list scrolling to extend to edge --- .../securesms/ConversationActivity.java | 5 ++--- .../securesms/ConversationFragment.java | 16 +++++++++------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java b/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java index 015dfdf02..f27917989 100644 --- a/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java @@ -995,10 +995,9 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity if(chatId == DcChat.DC_CHAT_NO_CHAT) throw new IllegalStateException("can't display a conversation for no chat."); dcChat = DcHelper.getContext(context).getChat(chatId); - if (dcChat.isDeviceTalk() || dcChat.isInBroadcast()) { + if (!dcChat.canSend()) { ViewUtil.applyWindowInsets(findViewById(R.id.root_layout), true, false, true, false); - ViewUtil.applyWindowInsets(findViewById(R.id.fragment_content), false, true, false, true); - fragment.hideBottomDivider(); + fragment.handleAdjustBottomLayout(); } recipient = new Recipient(this, dcChat); glideRequests = GlideApp.with(this); diff --git a/src/main/java/org/thoughtcrime/securesms/ConversationFragment.java b/src/main/java/org/thoughtcrime/securesms/ConversationFragment.java index 685d8e8b2..b8fe5cdfb 100644 --- a/src/main/java/org/thoughtcrime/securesms/ConversationFragment.java +++ b/src/main/java/org/thoughtcrime/securesms/ConversationFragment.java @@ -108,9 +108,9 @@ public class ConversationFragment extends MessageSelectorFragment public boolean isPaused; private Debouncer markseenDebouncer; private Rpc rpc; - private boolean pendingHideBottomDivider; + private boolean pendingAdjustBottomLayout; - @Override + @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); rpc = DcHelper.getRpc(getContext()); @@ -161,9 +161,10 @@ public class ConversationFragment extends MessageSelectorFragment // with hardware layers, drawing may result in errors as "OpenGLRenderer: Path too large to be rendered into a texture" list.setLayerType(View.LAYER_TYPE_SOFTWARE, null); - if (pendingHideBottomDivider) { + if (pendingAdjustBottomLayout) { bottomDivider.setVisibility(View.GONE); - pendingHideBottomDivider = false; + ViewUtil.applyWindowInsets(list, false, true, false, true); + pendingAdjustBottomLayout = false; } return view; @@ -204,13 +205,14 @@ public class ConversationFragment extends MessageSelectorFragment } } - public void hideBottomDivider() { + public void handleAdjustBottomLayout() { if (bottomDivider != null) { bottomDivider.setVisibility(View.GONE); - pendingHideBottomDivider = false; + ViewUtil.applyWindowInsets(list, false, true, false, true); + pendingAdjustBottomLayout = false; } else { - pendingHideBottomDivider = true; + pendingAdjustBottomLayout = true; } } From b66bc1f8637105a046151cc87f063749453c83a1 Mon Sep 17 00:00:00 2001 From: wch423 Date: Wed, 4 Feb 2026 18:04:34 +0100 Subject: [PATCH 4/7] Handle specific case when leaving group; also move floating button to avoid overaapping with system bar --- .../securesms/ConversationActivity.java | 8 +-- .../securesms/ConversationFragment.java | 34 ++++++++--- .../securesms/WebViewActivity.java | 2 +- .../thoughtcrime/securesms/util/ViewUtil.java | 59 +++++++++++++++---- 4 files changed, 80 insertions(+), 23 deletions(-) diff --git a/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java b/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java index f27917989..e6cb30b9d 100644 --- a/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java @@ -995,10 +995,6 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity if(chatId == DcChat.DC_CHAT_NO_CHAT) throw new IllegalStateException("can't display a conversation for no chat."); dcChat = DcHelper.getContext(context).getChat(chatId); - if (!dcChat.canSend()) { - ViewUtil.applyWindowInsets(findViewById(R.id.root_layout), true, false, true, false); - fragment.handleAdjustBottomLayout(); - } recipient = new Recipient(this, dcChat); glideRequests = GlideApp.with(this); @@ -1010,10 +1006,14 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity if (dcChat.canSend()) { composePanel.setVisibility(View.VISIBLE); attachmentManager.setHidden(false); + ViewUtil.forceApplyWindowInsets(findViewById(R.id.root_layout), true, false, true, true); + fragment.handleRemoveBottomInsets(); } else { composePanel.setVisibility(View.GONE); attachmentManager.setHidden(true); hideSoftKeyboard(); + ViewUtil.forceApplyWindowInsets(findViewById(R.id.root_layout), true, false, true, false); + fragment.handleAddBottomInsets(); } } diff --git a/src/main/java/org/thoughtcrime/securesms/ConversationFragment.java b/src/main/java/org/thoughtcrime/securesms/ConversationFragment.java index b8fe5cdfb..1276f7a30 100644 --- a/src/main/java/org/thoughtcrime/securesms/ConversationFragment.java +++ b/src/main/java/org/thoughtcrime/securesms/ConversationFragment.java @@ -108,7 +108,8 @@ public class ConversationFragment extends MessageSelectorFragment public boolean isPaused; private Debouncer markseenDebouncer; private Rpc rpc; - private boolean pendingAdjustBottomLayout; + private boolean pendingAddBottomInsets; + private boolean pendingRemoveBottomInsets; @Override public void onCreate(Bundle icicle) { @@ -161,10 +162,18 @@ public class ConversationFragment extends MessageSelectorFragment // with hardware layers, drawing may result in errors as "OpenGLRenderer: Path too large to be rendered into a texture" list.setLayerType(View.LAYER_TYPE_SOFTWARE, null); - if (pendingAdjustBottomLayout) { + if (pendingAddBottomInsets) { bottomDivider.setVisibility(View.GONE); ViewUtil.applyWindowInsets(list, false, true, false, true); - pendingAdjustBottomLayout = false; + ViewUtil.forceApplyWindowInsetsAsMargin(scrollToBottomButton, true, true, true, true); + pendingAddBottomInsets = false; + } + + if (pendingRemoveBottomInsets) { + bottomDivider.setVisibility(View.VISIBLE); + ViewUtil.applyWindowInsets(list, false, true, false, false); + ViewUtil.forceApplyWindowInsetsAsMargin(scrollToBottomButton, true, true, true, false); + pendingRemoveBottomInsets = false; } return view; @@ -205,14 +214,25 @@ public class ConversationFragment extends MessageSelectorFragment } } - public void handleAdjustBottomLayout() { + public void handleAddBottomInsets() { if (bottomDivider != null) { bottomDivider.setVisibility(View.GONE); ViewUtil.applyWindowInsets(list, false, true, false, true); - pendingAdjustBottomLayout = false; + ViewUtil.forceApplyWindowInsetsAsMargin(scrollToBottomButton, false, false, false, true); + pendingAddBottomInsets = false; + } else { + pendingAddBottomInsets = true; } - else { - pendingAdjustBottomLayout = true; + } + + public void handleRemoveBottomInsets() { + if (bottomDivider != null) { + bottomDivider.setVisibility(View.VISIBLE); + ViewUtil.applyWindowInsets(list, false, true, false, false); + ViewUtil.forceApplyWindowInsetsAsMargin(scrollToBottomButton, false, false, false, false); + pendingRemoveBottomInsets = false; + } else { + pendingRemoveBottomInsets = true; } } diff --git a/src/main/java/org/thoughtcrime/securesms/WebViewActivity.java b/src/main/java/org/thoughtcrime/securesms/WebViewActivity.java index 87094a35d..f6d1ec8fe 100644 --- a/src/main/java/org/thoughtcrime/securesms/WebViewActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/WebViewActivity.java @@ -77,7 +77,7 @@ public class WebViewActivity extends PassphraseRequiredActionBarActivity findViewById(R.id.status_bar_background).setBackgroundResource(R.drawable.search_toolbar_shadow); } else { // add padding to avoid content hidden behind system bars - ViewUtil.applyWindowInsets(findViewById(R.id.content_container), true, true, true, true, true); + ViewUtil.applyWindowInsets(findViewById(R.id.content_container), true, true, true, true, true, false); } webView.setWebViewClient(new WebViewClient() { diff --git a/src/main/java/org/thoughtcrime/securesms/util/ViewUtil.java b/src/main/java/org/thoughtcrime/securesms/util/ViewUtil.java index 91c4d3a6b..c90480836 100644 --- a/src/main/java/org/thoughtcrime/securesms/util/ViewUtil.java +++ b/src/main/java/org/thoughtcrime/securesms/util/ViewUtil.java @@ -323,7 +323,15 @@ public class ViewUtil { * @param view The view to apply insets to */ public static void applyWindowInsetsAsMargin(@NonNull View view) { - applyWindowInsetsAsMargin(view, true, true, true, true); + applyWindowInsetsAsMargin(view, true, true, true, true, false); + } + + public static void applyWindowInsetsAsMargin(@NonNull View view, boolean left, boolean top, boolean right, boolean bottom) { + applyWindowInsetsAsMargin(view, left, top, right, bottom, false); + } + + public static void forceApplyWindowInsetsAsMargin(@NonNull View view, boolean left, boolean top, boolean right, boolean bottom) { + applyWindowInsetsAsMargin(view, left, top, right, bottom, true); } /** @@ -337,8 +345,9 @@ public class ViewUtil { * @param top Whether to apply top inset * @param right Whether to apply right inset * @param bottom Whether to apply bottom inset + * @param forceDispatch Whether to force application of insets */ - public static void applyWindowInsetsAsMargin(@NonNull View view, boolean left, boolean top, boolean right, boolean bottom) { + public static void applyWindowInsetsAsMargin(@NonNull View view, boolean left, boolean top, boolean right, boolean bottom, boolean forceDispatch) { // Only enable on API 30+ where WindowInsets APIs work correctly if (!isEdgeToEdgeSupported()) return; @@ -371,10 +380,10 @@ public class ViewUtil { ViewGroup.LayoutParams layoutParams = v.getLayoutParams(); if (layoutParams instanceof ViewGroup.MarginLayoutParams) { ViewGroup.MarginLayoutParams marginParams = (ViewGroup.MarginLayoutParams) layoutParams; - marginParams.leftMargin = baseMarginLeft + insets.left; - marginParams.topMargin = baseMarginTop + insets.top; - marginParams.rightMargin = baseMarginRight + insets.right; - marginParams.bottomMargin = baseMarginBottom + insets.bottom; + marginParams.leftMargin = left ? baseMarginLeft + insets.left : baseMarginLeft; + marginParams.topMargin = top ? baseMarginTop + insets.top : baseMarginTop; + marginParams.rightMargin = right ? baseMarginRight + insets.right : baseMarginRight; + marginParams.bottomMargin = bottom ? baseMarginBottom + insets.bottom : baseMarginBottom; v.setLayoutParams(marginParams); } @@ -383,7 +392,14 @@ public class ViewUtil { // Request the initial insets to be dispatched if the view is attached if (view.isAttachedToWindow()) { - ViewCompat.requestApplyInsets(view); + if (forceDispatch) { + WindowInsetsCompat insets = ViewCompat.getRootWindowInsets(view); + if (insets != null) { + ViewCompat.dispatchApplyWindowInsets(view, insets); + } + } else { + ViewCompat.requestApplyInsets(view); + } } } @@ -395,7 +411,7 @@ public class ViewUtil { * @param view The view to apply insets to */ public static void applyWindowInsets(@NonNull View view) { - applyWindowInsets(view, true, true, true, true, false); + applyWindowInsets(view, true, true, true, true, false, false); } /** @@ -410,7 +426,20 @@ public class ViewUtil { * @param bottom Whether to apply bottom inset */ public static void applyWindowInsets(@NonNull View view, boolean left, boolean top, boolean right, boolean bottom) { - applyWindowInsets(view, left, top, right, bottom, false); + applyWindowInsets(view, left, top, right, bottom, false, false); + } + + /** + * Force applying window insets to a view by adding padding to avoid drawing elements behind system bars. + * + * @param view The view to apply insets to + * @param left Whether to apply left inset + * @param top Whether to apply top inset + * @param right Whether to apply right inset + * @param bottom Whether to apply bottom inset + */ + public static void forceApplyWindowInsets(@NonNull View view, boolean left, boolean top, boolean right, boolean bottom) { + applyWindowInsets(view, left, top, right, bottom, false, true); } /** @@ -425,8 +454,9 @@ public class ViewUtil { * @param right Whether to apply right inset * @param bottom Whether to apply bottom inset * @param consumeImeInsets Whether to consume IME insets so they don't propagate to child views + * @param forceDispatch Force application of Insets, regardless if system think it shall dispatch */ - public static void applyWindowInsets(@NonNull View view, boolean left, boolean top, boolean right, boolean bottom, boolean consumeImeInsets) { + public static void applyWindowInsets(@NonNull View view, boolean left, boolean top, boolean right, boolean bottom, boolean consumeImeInsets, boolean forceDispatch) { // Only enable on API 30+ where WindowInsets APIs work correctly if (!isEdgeToEdgeSupported()) return; @@ -469,7 +499,14 @@ public class ViewUtil { // Request the initial insets to be dispatched if the view is attached if (view.isAttachedToWindow()) { - ViewCompat.requestApplyInsets(view); + if (forceDispatch) { + WindowInsetsCompat insets = ViewCompat.getRootWindowInsets(view); + if (insets != null) { + ViewCompat.dispatchApplyWindowInsets(view, insets); + } + } else { + ViewCompat.requestApplyInsets(view); + } } } From 2889266522a9f522d08c49181b1e8ea1a6b42301 Mon Sep 17 00:00:00 2001 From: wch423 Date: Thu, 5 Feb 2026 16:28:38 +0100 Subject: [PATCH 5/7] Force dispatch all inset changes immediately in ConversationFragment --- .../org/thoughtcrime/securesms/ConversationFragment.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/thoughtcrime/securesms/ConversationFragment.java b/src/main/java/org/thoughtcrime/securesms/ConversationFragment.java index 1276f7a30..f09d0c9f6 100644 --- a/src/main/java/org/thoughtcrime/securesms/ConversationFragment.java +++ b/src/main/java/org/thoughtcrime/securesms/ConversationFragment.java @@ -164,14 +164,14 @@ public class ConversationFragment extends MessageSelectorFragment if (pendingAddBottomInsets) { bottomDivider.setVisibility(View.GONE); - ViewUtil.applyWindowInsets(list, false, true, false, true); + ViewUtil.forceApplyWindowInsets(list, false, true, false, true); ViewUtil.forceApplyWindowInsetsAsMargin(scrollToBottomButton, true, true, true, true); pendingAddBottomInsets = false; } if (pendingRemoveBottomInsets) { bottomDivider.setVisibility(View.VISIBLE); - ViewUtil.applyWindowInsets(list, false, true, false, false); + ViewUtil.forceApplyWindowInsets(list, false, true, false, false); ViewUtil.forceApplyWindowInsetsAsMargin(scrollToBottomButton, true, true, true, false); pendingRemoveBottomInsets = false; } @@ -217,7 +217,7 @@ public class ConversationFragment extends MessageSelectorFragment public void handleAddBottomInsets() { if (bottomDivider != null) { bottomDivider.setVisibility(View.GONE); - ViewUtil.applyWindowInsets(list, false, true, false, true); + ViewUtil.forceApplyWindowInsets(list, false, true, false, true); ViewUtil.forceApplyWindowInsetsAsMargin(scrollToBottomButton, false, false, false, true); pendingAddBottomInsets = false; } else { @@ -228,7 +228,7 @@ public class ConversationFragment extends MessageSelectorFragment public void handleRemoveBottomInsets() { if (bottomDivider != null) { bottomDivider.setVisibility(View.VISIBLE); - ViewUtil.applyWindowInsets(list, false, true, false, false); + ViewUtil.forceApplyWindowInsets(list, false, true, false, false); ViewUtil.forceApplyWindowInsetsAsMargin(scrollToBottomButton, false, false, false, false); pendingRemoveBottomInsets = false; } else { From 82118db71b2581baa35dd5395e818c1b93a26fea Mon Sep 17 00:00:00 2001 From: wch423 Date: Thu, 5 Feb 2026 17:27:21 +0100 Subject: [PATCH 6/7] Make inset changes only happen on initialization of activity --- .../securesms/ConversationActivity.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java b/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java index 0a77b617c..40c4d354c 100644 --- a/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java @@ -1001,22 +1001,26 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity recipient = new Recipient(this, dcChat); glideRequests = GlideApp.with(this); - setComposePanelVisibility(); + setComposePanelVisibility(true); initializeContactRequest(); } - private void setComposePanelVisibility() { + private void setComposePanelVisibility(boolean isInitialization) { if (dcChat.canSend()) { composePanel.setVisibility(View.VISIBLE); attachmentManager.setHidden(false); - ViewUtil.forceApplyWindowInsets(findViewById(R.id.root_layout), true, false, true, true); - fragment.handleRemoveBottomInsets(); + if (isInitialization) { + ViewUtil.forceApplyWindowInsets(findViewById(R.id.root_layout), true, false, true, true); + fragment.handleRemoveBottomInsets(); + } } else { composePanel.setVisibility(View.GONE); attachmentManager.setHidden(true); hideSoftKeyboard(); - ViewUtil.forceApplyWindowInsets(findViewById(R.id.root_layout), true, false, true, false); - fragment.handleAddBottomInsets(); + if (isInitialization) { + ViewUtil.forceApplyWindowInsets(findViewById(R.id.root_layout), true, false, true, false); + fragment.handleAddBottomInsets(); + } } } @@ -1582,7 +1586,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity dcChat = dcContext.getChat(chatId); titleView.setTitle(glideRequests, dcChat); initializeSecurity(isSecureText, isDefaultSms); - setComposePanelVisibility(); + setComposePanelVisibility(false); initializeContactRequest(); } else if ((eventId == DcContext.DC_EVENT_INCOMING_MSG || eventId == DcContext.DC_EVENT_MSG_READ) From 3386f5c5f72e3ad4e73224f7db55970d200d26ad Mon Sep 17 00:00:00 2001 From: wch423 Date: Thu, 5 Feb 2026 19:07:43 +0100 Subject: [PATCH 7/7] Make `!CanSend` -> `CanSend` still trigger Inset changes --- .../org/thoughtcrime/securesms/ConversationActivity.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java b/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java index 40c4d354c..b8db8fc4f 100644 --- a/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java @@ -1009,10 +1009,8 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity if (dcChat.canSend()) { composePanel.setVisibility(View.VISIBLE); attachmentManager.setHidden(false); - if (isInitialization) { - ViewUtil.forceApplyWindowInsets(findViewById(R.id.root_layout), true, false, true, true); - fragment.handleRemoveBottomInsets(); - } + ViewUtil.forceApplyWindowInsets(findViewById(R.id.root_layout), true, false, true, true); + fragment.handleRemoveBottomInsets(); } else { composePanel.setVisibility(View.GONE); attachmentManager.setHidden(true);