From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: alina sireneva <alina@tei.pet>
Date: Thu, 23 Jul 2026 12:29:15 +0400
Subject: non-island ui in various parts of the app

---
 .../org/telegram/ui/ActionBar/ActionBar.java  |  45 +++---
 .../ui/ActionBar/ActionBarLayout.java         |   2 +-
 .../telegram/ui/ChannelAdminLogActivity.java  |  21 ++-
 .../java/org/telegram/ui/ChatActivity.java    | 127 +++++++++------
 .../ui/Components/ChatActivityEnterView.java  |  66 +++++---
 ...ChatActivityEnterViewAnimatedIconView.java |  17 +-
 .../ChatActivityTopPanelLayout.java           |  16 +-
 .../ui/Components/ChatAttachAlert.java        |  20 +++
 .../ui/Components/ChatAvatarContainer.java    |   1 +
 .../DialogsActivityTopPanelLayout.java        |   8 +-
 .../ui/Components/FilterTabsView.java         |  19 ++-
 .../ui/Components/FragmentSearchField.java    |  10 +-
 .../telegram/ui/Components/MediaActivity.java |   2 +-
 .../ui/Components/MentionsContainerView.java  |  19 +--
 .../ui/Components/RecyclerListView.java       |   7 +
 .../Components/ScrollSlidingTextTabStrip.java | 116 +++++++++++++-
 .../ui/Components/SearchTagsList.java         |   3 +
 .../ui/Components/SharedMediaLayout.java      |  56 ++++++-
 .../ui/Components/TopicsTabsView.java         |  28 ++--
 .../ui/Components/TranslateButton.java        |   4 +-
 .../ui/Components/ViewPagerFixed.java         |  12 +-
 .../drawable/BlurredBackgroundDrawable.java   |   5 +-
 .../impl/BlurredBackgroundProviderImpl.java   |  13 +-
 .../chat/ChatInputViewsContainer.java         |  30 +++-
 .../ChatActivityBlurredRoundButton.java       |   6 +-
 .../ChatActivityChannelButtonsLayout.java     |  33 +++-
 .../ui/Components/glass/GlassTabView.java     |   5 +-
 .../java/org/telegram/ui/DialogsActivity.java | 148 +++++++++++-------
 .../java/org/telegram/ui/ProfileActivity.java |  28 ++--
 .../ui/SearchTabsAndFiltersLayout.java        |   6 +
 .../java/org/telegram/ui/bots/BotAdView.java  |   2 +-
 .../ui/bots/BotCommandsMenuContainer.java     |   4 +-
 .../bots/ChatAttachAlertBotWebViewLayout.java |   5 +-
 .../java/org/telegram/ui/iv/RichEditor.java   |   4 +-
 34 files changed, 643 insertions(+), 245 deletions(-)

diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBar.java b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBar.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBar.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBar.java
@@ -93,6 +93,7 @@ public class ActionBar extends FrameLayout implements FactorAnimator.Target, The
     private BlurredBackgroundDrawable glassDrawable;
     private Drawable glassDrawableBack;
     private Drawable glassDrawableMenu;
+    public boolean inu_nonIsland;
     private INavigationLayout.BackButtonState backButtonState = INavigationLayout.BackButtonState.BACK;
     public ImageView backButtonImageView;
     private BackupImageView avatarSearchImageView;
@@ -218,33 +219,35 @@ public class ActionBar extends FrameLayout implements FactorAnimator.Target, The
         glassMode = true;
         glassModeIsForum = isForum;
 
+        final int glassRadius = inu_nonIsland ? 0 : 23;
+        final int glassPadding = inu_nonIsland ? 0 : 6;
+
         glassDrawable = factory.create(this)
             .setColorProvider(colorProvider)
-            .setPadding(dp(6));
-        if (isForum) {
+            .setPadding(dp(glassPadding));
+        if (isForum && !inu_nonIsland) {
             glassDrawable.setRadius(dp(18.33f), dp(23), dp(23), dp(18.33f));
         } else {
-            glassDrawable.setRadius(dp(23));
+            glassDrawable.setRadius(dp(glassRadius));
         }
 
-
         glassDrawableBack = factory.create(this)
             .setColorProvider(colorProvider)
-            .setRadius(dp(23))
-            .setPadding(dp(6));
+            .setRadius(dp(glassRadius))
+            .setPadding(dp(glassPadding));
 
         glassDrawableMenu = factory.create(this)
             .setColorProvider(colorProvider)
-            .setRadius(dp(23))
-            .setPadding(dp(6));
+            .setRadius(dp(glassRadius))
+            .setPadding(dp(glassPadding));
 
         if (menu != null) {
-            menu.setTranslationX(-dp(10));
-            menu.setGlassMode(true);
+            menu.setTranslationX(inu_nonIsland ? 0 : -dp(10));
+            menu.setGlassMode(!inu_nonIsland);
         }
         if (actionMode != null) {
-            actionMode.setTranslationX(-dp(10));
-            actionMode.setGlassMode(true);
+            actionMode.setTranslationX(inu_nonIsland ? 0 : -dp(10));
+            actionMode.setGlassMode(!inu_nonIsland);
         }
         if (backButtonImageView != null) {
             backButtonImageView.setTranslationX(dp(2));
@@ -759,8 +762,8 @@ public class ActionBar extends FrameLayout implements FactorAnimator.Target, The
                 }
             }
         };
-        actionMode.setTranslationX(glassMode ? -dp(10) : 0);
-        actionMode.setGlassMode(glassMode);
+        actionMode.setTranslationX(glassMode && !inu_nonIsland ? -dp(10) : 0);
+        actionMode.setGlassMode(glassMode && !inu_nonIsland);
         actionMode.isActionMode = true;
         actionMode.setClickable(true);
         if (!glassMode) {
@@ -1197,14 +1200,14 @@ public class ActionBar extends FrameLayout implements FactorAnimator.Target, The
         alphaUpdate.addUpdateListener(anm -> {
             searchFieldVisibleAlpha = (float) anm.getAnimatedValue();
 
-            if (glassDrawable != null && glassModeIsForum) {
+            if (glassDrawable != null && glassModeIsForum && !inu_nonIsland) {
                 final float r1 = dp(23);
                 final float r2 = lerp(dp(18.33f), dp(23), searchFieldVisibleAlpha);
                 glassDrawable.setRadius(r2, r1, r1, r2);
                 invalidate();
             }
 
-            if (glassMode && menu != null) {
+            if (glassMode && menu != null && !inu_nonIsland) {
                 menu.setTranslationX(-lerp((float) dp(10), dp(5), searchFieldVisibleAlpha));
             }
             if (backgroundUpdateListener != null) {
@@ -2183,14 +2186,18 @@ public class ActionBar extends FrameLayout implements FactorAnimator.Target, The
                 right = rightDefault;
             }
 
-            glassDrawable.setBounds(left, t, right, b);
+            if (inu_nonIsland) {
+                glassDrawable.setBounds(0, 0, getWidth(), getHeight());
+            } else {
+                glassDrawable.setBounds(left, t, right, b);
+            }
             glassDrawable.draw(canvas);
         }
-        if (glassDrawableBack != null && hasBackButton) {
+        if (glassDrawableBack != null && hasBackButton && !inu_nonIsland) {
             glassDrawableBack.setBounds(0, t, s + p * 2, b);
             glassDrawableBack.draw(canvas);
         }
-        if (glassDrawableMenu != null && menuWidth > 0 && !glassOnlyBack) {
+        if (glassDrawableMenu != null && menuWidth > 0 && !glassOnlyBack && !inu_nonIsland) {
             glassDrawableMenu.setBounds(getWidth() - Math.max(s, menuWidth) - p * 2, t, getWidth(), b);
             glassDrawableMenu.setAlpha(hasForcedMenuWidth ? 255 : (int) (255 * animatorHasMenuItems.getFloatValue()));
             glassDrawableMenu.draw(canvas);
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarLayout.java b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarLayout.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarLayout.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarLayout.java
@@ -2088,7 +2088,7 @@ public class ActionBarLayout extends FrameLayout implements INavigationLayout, F
 
                         @Override
                         public void getOutline(View view, Outline outline) {
-                            final float rTop = dp(29);
+                            final float rTop = dp(desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? 12 : 29);
                             final float rBottom = dp(12);
                             final float[] radii = new float[] {
                                 rTop, rTop, rTop, rTop,
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChannelAdminLogActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChannelAdminLogActivity.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/ChannelAdminLogActivity.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/ChannelAdminLogActivity.java
@@ -1158,6 +1158,8 @@ public class ChannelAdminLogActivity extends BaseFragment implements Notificatio
 
         contentView.setOccupyStatusBar(!AndroidUtilities.isTablet());
         contentView.setBackgroundImage(Theme.getCachedWallpaper(), Theme.isWallpaperMotion());
+        boolean nonIsland = desu.inugram.helpers.theme.NonIslandHelper.chatElements();
+        actionBar.inu_nonIsland = nonIsland;
         actionBar.setupGlass(glassBackgroundDrawableFactory, BlurredBackgroundProviderImpl.topPanelChatActivity(resourceProvider));
         emptyViewContainer = new FrameLayout(context);
         emptyViewContainer.setVisibility(View.INVISIBLE);
@@ -1490,10 +1492,16 @@ public class ChannelAdminLogActivity extends BaseFragment implements Notificatio
         bottomOverlayChat2 = new ChatActivityChannelButtonsLayout(context, resourceProvider,
             BlurredBackgroundProviderImpl.bottomPanelChatActivity(resourceProvider), glassBackgroundDrawableFactory);
         bottomOverlayChat2.setTotalVisibilityFactor(1f);
-        bottomOverlayChat2.setTranslationY(-AndroidUtilities.navigationBarHeight);
+        bottomOverlayChat2.setTranslationY(nonIsland ? 0 : -AndroidUtilities.navigationBarHeight);
         bottomOverlayChat2.showButton(ChatActivityChannelButtonsLayout.BUTTON_RECENT_ACTIONS_INFO, true, false);
         bottomOverlayChat2.setupDrawableForContainer();
-        contentView.addView(bottomOverlayChat2, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 56, Gravity.BOTTOM, 54, 0, 0, (44 - 56) / 2 + 9));
+        contentView.addView(bottomOverlayChat2, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 56, Gravity.BOTTOM, nonIsland ? 0 : 54, 0, 0, nonIsland ? 0 : ((44 - 56) / 2 + 9)));
+        if (nonIsland) {
+            // extend below to cover the nav bar inset; bottom padding keeps content above it
+            bottomOverlayChat2.setClipToPadding(false);
+            bottomOverlayChat2.setPadding(0, 0, 0, AndroidUtilities.navigationBarHeight);
+            ((FrameLayout.LayoutParams) bottomOverlayChat2.getLayoutParams()).height = dp(48) + AndroidUtilities.navigationBarHeight;
+        }
 
         bottomOverlayChatText = new TextView(context);
         bottomOverlayChatText.setOnClickListener(view -> {
@@ -1518,8 +1526,15 @@ public class ChannelAdminLogActivity extends BaseFragment implements Notificatio
         bottomOverlayChatText.setTypeface(AndroidUtilities.bold());
         bottomOverlayChatText.setTextColor(Theme.getColor(Theme.key_chat_fieldOverlayText));
         bottomOverlayChatText.setText(getString(R.string.SETTINGS));
+        bottomOverlayChatText.setGravity(Gravity.CENTER);
         bottomOverlayChatText.setPadding(dp(24), 0, dp(24), 0);
-        bottomOverlayChat2.getContainer().addView(bottomOverlayChatText, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.CENTER));
+        if (nonIsland) {
+            // full-width tap area + ripple; island mode keeps the text-hugging pill
+            bottomOverlayChatText.setBackground(Theme.createSelectorDrawable(
+                Theme.multAlpha(Theme.getColor(Theme.key_chat_fieldOverlayText), 0.10f),
+                Theme.RIPPLE_MASK_ALL));
+        }
+        bottomOverlayChat2.getContainer().addView(bottomOverlayChatText, LayoutHelper.createFrame(nonIsland ? LayoutHelper.MATCH_PARENT : LayoutHelper.WRAP_CONTENT, nonIsland ? LayoutHelper.MATCH_PARENT : LayoutHelper.WRAP_CONTENT, Gravity.CENTER));
         bottomOverlayChat2.makeViewWrapContent(bottomOverlayChatText);
         bottomOverlayChat2.updateWrappingVisible(false);
 
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java
@@ -353,6 +353,7 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
 
+import desu.inugram.helpers.theme.NonIslandHelper;
 import me.vkryl.android.animator.BoolAnimator;
 import me.vkryl.android.animator.FactorAnimator;
 import me.vkryl.core.BitwiseUtils;
@@ -599,7 +600,7 @@ public class ChatActivity extends BaseFragment implements
     private Runnable hideAlertViewRunnable;
     private TextView alertNameTextView;
     private TextView alertTextView;
-    private final int searchContainerHeight = 44;
+    private final int searchContainerHeight = ChatActivityEnterView.DEFAULT_HEIGHT;
     private FrameLayout searchContainer;
     private ImageView searchCalendarButton;
     private ImageView searchUserButton;
@@ -2561,7 +2562,7 @@ public class ChatActivity extends BaseFragment implements
             scheduledOrNoSoundHint = new HintView(getParentActivity(), 4, themeDelegate) {
                 @Override
                 protected int offsetCx() {
-                    return dp(100 - 44) / 2;
+                    return dp(100 - ChatActivityEnterView.DEFAULT_HEIGHT) / 2;
                 }
             };
             scheduledOrNoSoundHint.createCloseButton();
@@ -2614,9 +2615,9 @@ public class ChatActivity extends BaseFragment implements
             glassBackgroundSourceFrostedRenderNode.setUnderSource(navbarContentSourceWallpaper);
 
             glassBackgroundDrawableFactoryFrosted = new BlurredBackgroundDrawableViewFactory(glassBackgroundSourceFrostedRenderNode);
-            glassBackgroundDrawableFactoryFrosted.setLiquidGlassEffectAllowed(LiteMode.isEnabled(LiteMode.FLAG_LIQUID_GLASS));
+            glassBackgroundDrawableFactoryFrosted.setLiquidGlassEffectAllowed(!NonIslandHelper.chatElements() && LiteMode.isEnabled(LiteMode.FLAG_LIQUID_GLASS));
 
-            if (LiteMode.isEnabled(LiteMode.FLAG_LIQUID_GLASS)) {
+            if (!NonIslandHelper.chatElements() && LiteMode.isEnabled(LiteMode.FLAG_LIQUID_GLASS)) {
                 glassBackgroundSourceRenderNode = new BlurredBackgroundSourceRenderNode(navbarContentSourceWallpaper);
                 glassBackgroundSourceRenderNode.setOnDrawablesRelativePositionChangeListener(this::invalidateMergedVisibleBlurredPositionsAndSourcesPositions);
                 glassBackgroundSourceRenderNode.setScrollableNoiseSuppressor(scrollableViewNoiseSuppressor, DownscaleScrollableNoiseSuppressor.DRAW_GLASS);
@@ -4554,6 +4555,7 @@ public class ChatActivity extends BaseFragment implements
 
         contentView.setOccupyStatusBar(!inBubbleMode && !isInsideContainer && !inPreviewMode);
 
+        actionBar.inu_nonIsland = NonIslandHelper.chatElements();
         actionBar.setupGlass(
             glassBackgroundDrawableFactory,
             BlurredBackgroundProviderImpl.topPanelChatActivity(themeDelegate),
@@ -5403,7 +5405,7 @@ public class ChatActivity extends BaseFragment implements
                             j++;
                         }
 
-                        lastTop = messageSkeletons.isEmpty() ? getHeight() - blurredViewBottomOffset : messageSkeletons.get(0).lastBottom + AndroidUtilities.dp(3f);
+                        lastTop = messageSkeletons.isEmpty() ? getHeight() - blurredViewBottomOffset + (NonIslandHelper.chatElements() ? dp(16) : 0) : messageSkeletons.get(0).lastBottom + AndroidUtilities.dp(3f);
                         int left = dp(noAvatar ? 3 : 51);
                         if (isSideMenued()) {
                             left = lerp(left, dp(SIDE_MENU_WIDTH), getSideMenuAlpha());
@@ -6394,7 +6396,7 @@ public class ChatActivity extends BaseFragment implements
             chatListView.setClipChildren(false);
         }
         chatListView.setAnimateEmptyView(true, RecyclerListView.EMPTY_VIEW_ANIMATION_TYPE_ALPHA_SCALE);
-        chatListView.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY);
+        chatListView.setScrollBarStyle(NonIslandHelper.chatElements() ? View.SCROLLBARS_INSIDE_OVERLAY : View.SCROLLBARS_OUTSIDE_OVERLAY);
         chatListViewPaddingsAnimator = new ChatListViewPaddingsAnimator(chatListView);
         chatListViewPaddingTop = 0;
         paddingTopHeight = 0;
@@ -7773,7 +7775,7 @@ public class ChatActivity extends BaseFragment implements
                 .setColorProvider(BlurredBackgroundProviderImpl.topPanelChatActivity(resourceProvider))
                 .setRadius(dp(18)).setPadding(dp(7f)));
 
-            contentView.addView(hashtagSearchTabs, LayoutHelper.createFrameMarginPx(LayoutHelper.MATCH_PARENT, 50, Gravity.FILL_HORIZONTAL | Gravity.TOP, 0, -dp(5), 0, 0));
+            contentView.addView(hashtagSearchTabs, LayoutHelper.createFrameMarginPx(LayoutHelper.MATCH_PARENT, 50, Gravity.FILL_HORIZONTAL | Gravity.TOP, 0, NonIslandHelper.chatElements() ? 0 : -dp(5), 0, 0));
         }
         contentView.addView(topPanelLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP));
 
@@ -7874,7 +7876,7 @@ public class ChatActivity extends BaseFragment implements
                         }
 
                         // chatListView.setTranslationY(dy);
-                        if (topView != null && topView.getVisibility() == View.VISIBLE) {
+                        if (!NonIslandHelper.chatElements() && topView != null && topView.getVisibility() == View.VISIBLE) {
                             topView.setTranslationY(animatedTop + (1f - getTopViewEnterProgress()) * topView.getLayoutParams().height);
                         }
 
@@ -7882,7 +7884,7 @@ public class ChatActivity extends BaseFragment implements
                         changeBoundAnimator.addUpdateListener(a -> {
                             float top = (float) a.getAnimatedValue();
                             setAnimatedTop((int) top);
-                            if (topView != null && topView.getVisibility() == View.VISIBLE) {
+                            if (!NonIslandHelper.chatElements() && topView != null && topView.getVisibility() == View.VISIBLE) {
                                 topView.setTranslationY(top + (1f - getTopViewEnterProgress()) * topView.getLayoutParams().height);
                             } else {
                                 invalidateChatListViewTopPadding();
@@ -7895,7 +7897,7 @@ public class ChatActivity extends BaseFragment implements
                             @Override
                             public void onAnimationEnd(Animator animation) {
                                 setAnimatedTop(0);
-                                if (topView != null && topView.getVisibility() == View.VISIBLE) {
+                                if (!NonIslandHelper.chatElements() && topView != null && topView.getVisibility() == View.VISIBLE) {
                                     topView.setTranslationY(animatedTop + (1f - getTopViewEnterProgress()) * topView.getLayoutParams().height);
                                 }
                                 changeBoundAnimator = null;
@@ -8062,7 +8064,7 @@ public class ChatActivity extends BaseFragment implements
         chatActivityEnterView.setViewParentForEmoji(chatInputInAppContainer);
         checkSendButtonBlockedByTyping(false);
 
-        chatInputBubbleContainer.addView(chatActivityEnterView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.BOTTOM, 7, 0, 7, 0));
+        chatInputBubbleContainer.addView(chatActivityEnterView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.BOTTOM, NonIslandHelper.chatElements() ? 0 : 7, 0, NonIslandHelper.chatElements() ? 0 : 7, NonIslandHelper.chatElements() ? -9 : 0));
 
         int chatListIndex = contentView.indexOfChild(chatListView);
         chatListIndex = chatListIndex < 0 ? contentView.getChildCount() : (chatListIndex + 1);
@@ -8103,7 +8105,7 @@ public class ChatActivity extends BaseFragment implements
         bottomViewsVisibilityController.setViewVisible(MESSAGE_ACTION_CONTAINER, false, false);
         actionsButtonsLayout.setPadding(0, dp(56), 0, 0);
         actionsButtonsLayout.setClipToPadding(false);
-        chatInputBubbleContainer.addView(actionsButtonsLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 106, Gravity.BOTTOM));
+        chatInputBubbleContainer.addView(actionsButtonsLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 106, Gravity.BOTTOM, 0, 0, 0, NonIslandHelper.chatElements() ? -9 : 0));
         chatActivityEnterView.setSuggestionButtonVisible(ChatObject.isMonoForum(currentChat), false);
 
         chatActivityEnterTopView = new ChatActivityEnterTopView(context) {
@@ -8332,7 +8334,7 @@ public class ChatActivity extends BaseFragment implements
         bottomOverlay.setFocusable(true);
         bottomOverlay.setFocusableInTouchMode(true);
         bottomOverlay.setClickable(true);
-        chatInputBubbleContainer.addView(bottomOverlay, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 44, Gravity.BOTTOM, 7, 0, 7, 0));
+        chatInputBubbleContainer.addView(bottomOverlay, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, ChatActivityEnterView.DEFAULT_HEIGHT, Gravity.BOTTOM, 7, 0, 7, 0));
 
         bottomOverlayText = new TextView(context);
         bottomOverlayText.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14);
@@ -8419,7 +8421,7 @@ public class ChatActivity extends BaseFragment implements
             chatInputViewsContainer.setInputBubbleOffsets(l, r);
         });
 
-        chatInputBubbleContainer.addView(bottomChannelButtonsLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 56, Gravity.BOTTOM, 0, 0, 0, (44 - 56) / 2));
+        chatInputBubbleContainer.addView(bottomChannelButtonsLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 56, Gravity.BOTTOM, 0, 0, 0, (ChatActivityEnterView.DEFAULT_HEIGHT - 56) / 2 - (NonIslandHelper.chatElements() ? 10 : 0)));
 
         bottomOverlayStartButton = new TextView(context) {
             CellFlickerDrawable cellFlickerDrawable;
@@ -8943,14 +8945,19 @@ public class ChatActivity extends BaseFragment implements
                 glassBackgroundDrawableFactory,
                 BlurredBackgroundProviderImpl.topPanelChatActivityTags(resourceProvider)
             );
+            if (NonIslandHelper.chatElements()) {
+                actionBarSearchTags.setBackground(glassBackgroundDrawableFactory.create(actionBarSearchTags)
+                    .setColorProvider(BlurredBackgroundProviderImpl.topPanelChatActivityTags(resourceProvider))
+                    .setRadius(0));
+            }
             contentView.addView(actionBarSearchTags, LayoutHelper.createFrameMarginPx(LayoutHelper.MATCH_PARENT, 38, Gravity.FILL_HORIZONTAL | Gravity.TOP, 0, -dp(3), 0, 0));
         }
 
         checkUi_topPanelLayoutWidth();
         topPanelLayout.setBlurredBackground(glassBackgroundDrawableFactory.create(topPanelLayout)
             .setColorProvider(BlurredBackgroundProviderImpl.topPanelChatActivity(themeDelegate))
-            .setRadius(dp(18))
-            .setPadding(dp(7)));
+            .setRadius(dp(NonIslandHelper.chatElements() ? 0 : 18))
+            .setPadding(dp(NonIslandHelper.chatElements() ? 0 : 7)));
 
         if (chatMode == MODE_SEARCH) {
             animatorSearchResultAsListVisibility.setValue(true, false);
@@ -9635,6 +9642,7 @@ public class ChatActivity extends BaseFragment implements
         reportSpamButton = new TextView(getContext());
         reportSpamButton.setTextColor(getThemedColor(Theme.key_text_RedBold));
         reportSpamButton.setBackground(Theme.createInsetRoundRectDrawable(getThemedColor(Theme.key_text_RedBold) & 0x19ffffff, dp(18), dp(4)));
+        NonIslandHelper.applyChatTopPanelButton(reportSpamButton);
         reportSpamButton.setTag(Theme.key_text_RedBold);
         reportSpamButton.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14);
         reportSpamButton.setTypeface(AndroidUtilities.bold());
@@ -9671,6 +9679,7 @@ public class ChatActivity extends BaseFragment implements
         addToContactsButton.setPadding(AndroidUtilities.dp(4), 0, AndroidUtilities.dp(4), 0);
         addToContactsButton.setGravity(Gravity.CENTER);
         addToContactsButton.setBackground(Theme.createInsetRoundRectDrawable(getThemedColor(Theme.key_chat_addContact) & 0x19ffffff, dp(18), dp(4)));
+        NonIslandHelper.applyChatTopPanelButton(addToContactsButton);
         topChatPanelView.addView(addToContactsButton, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.LEFT | Gravity.TOP));
         addToContactsButton.setOnClickListener(v -> {
             if (addToContactsButtonArchive) {
@@ -9730,6 +9739,7 @@ public class ChatActivity extends BaseFragment implements
         restartTopicButton.setGravity(Gravity.CENTER);
         restartTopicButton.setText(LocaleController.getString(R.string.RestartTopic));
         restartTopicButton.setBackground(Theme.createSelectorDrawable(getThemedColor(Theme.key_chat_addContact) & 0x19ffffff, 3));
+        NonIslandHelper.applyChatTopPanelButton(restartTopicButton);
         topPanelLayout.addView(restartTopicButton, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 48));
         topPanelLayout.setPriority(restartTopicButton, 4);
         topPanelLayout.setDebugName(restartTopicButton, "restart topic button");
@@ -9826,6 +9836,7 @@ public class ChatActivity extends BaseFragment implements
             });
         });
         ScaleStateListAnimator.apply(addProfilePictureButton, 0.04f, 1.5f);
+        NonIslandHelper.applyChatTopPanelButton(addProfilePictureButton);
         topPanelLayout.addView(addProfilePictureButton, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 36, Gravity.LEFT | Gravity.BOTTOM));
         topPanelLayout.setPriority(addProfilePictureButton, 12);
         topPanelLayout.setDebugName(addProfilePictureButton, "add profile picture button");
@@ -10148,7 +10159,7 @@ public class ChatActivity extends BaseFragment implements
             index = index2 + 1;
         }
 
-        contentView.addView(topicsTabs, index, LayoutHelper.createFrameMarginPx(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT, 0, -dp(5), 0, 0));
+        contentView.addView(topicsTabs, index, LayoutHelper.createFrameMarginPx(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT, 0, NonIslandHelper.chatElements() ? 0 : -dp(5), 0, 0));
         topicsTabs.updateSidemenuPosition();
         if (mentionContainer != null) {
             mentionContainer.bringToFront();
@@ -10260,7 +10271,7 @@ public class ChatActivity extends BaseFragment implements
         selectedMessagesCountTextView.setEllipsizeByGradient(true);
         selectedMessagesCountTextView.setRightPadding(dp(8));
         selectedMessagesCountTextView.getDrawable().setOverrideFullWidth(dp(300));
-        actionMode.addView(selectedMessagesCountTextView, LayoutHelper.createLinear(0, LayoutHelper.MATCH_PARENT, 1.0f, 85, 0, 5, 0));
+        actionMode.addView(selectedMessagesCountTextView, NonIslandHelper.chatElements() ? LayoutHelper.createLinear(0, LayoutHelper.MATCH_PARENT, 1.0f, 65, 0, 0, 0) : LayoutHelper.createLinear(0, LayoutHelper.MATCH_PARENT, 1.0f, 85, 0, 5, 0));
         actionMode.setOnLayoutListener(actionBar::invalidate);
 
         if (currentEncryptedChat == null) {
@@ -10492,7 +10503,7 @@ public class ChatActivity extends BaseFragment implements
         searchCountText.setTextColor(getThemedColor(Theme.key_chat_searchPanelText));
         searchCountText.setGravity(Gravity.LEFT);
         searchContainer.addView(searchCountText, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, 30, Gravity.CENTER_VERTICAL, 0, -1, 97.33f, 0));
-        chatInputBubbleContainer.addView(searchContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, searchContainerHeight, Gravity.BOTTOM, 7, 0, 7, 0));
+        chatInputBubbleContainer.addView(searchContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, searchContainerHeight, Gravity.BOTTOM, NonIslandHelper.chatElements() ? 0 : 7, 0, NonIslandHelper.chatElements() ? 0 : 7, NonIslandHelper.chatElements() ? -9 : 0));
 
         searchExpandList = new AnimatedTextView(getContext(), true, false, true);
         searchExpandList.setAnimationProperties(0, 0, 420, CubicBezierInterpolator.EASE_OUT_QUINT);
@@ -10531,7 +10542,7 @@ public class ChatActivity extends BaseFragment implements
             searchUserButton.setImageResource(R.drawable.msg_usersearch);
             searchUserButton.setColorFilter(new PorterDuffColorFilter(getThemedColor(Theme.key_chat_searchPanelIcons), PorterDuff.Mode.MULTIPLY));
             searchUserButton.setBackgroundDrawable(Theme.createSelectorDrawable(getThemedColor(Theme.key_actionBarActionModeDefaultSelector), 1));
-            searchContainer.addView(searchUserButton, LayoutHelper.createFrame(44, 44, Gravity.LEFT | Gravity.TOP, 48, 0, 0, 0));
+            searchContainer.addView(searchUserButton, LayoutHelper.createFrame(ChatActivityEnterView.DEFAULT_HEIGHT, ChatActivityEnterView.DEFAULT_HEIGHT, Gravity.LEFT | Gravity.TOP, 48, 0, 0, 0));
             searchUserButton.setOnClickListener(view -> {
                 if (mentionContainer != null) {
                     mentionContainer.setReversed(true);
@@ -10557,7 +10568,7 @@ public class ChatActivity extends BaseFragment implements
             searchCalendarButton.setImageResource(R.drawable.msg_calendar);
             searchCalendarButton.setColorFilter(new PorterDuffColorFilter(getThemedColor(Theme.key_chat_searchPanelIcons), PorterDuff.Mode.MULTIPLY));
             searchCalendarButton.setBackgroundDrawable(Theme.createSelectorDrawable(getThemedColor(Theme.key_actionBarActionModeDefaultSelector), 1));
-            searchContainer.addView(searchCalendarButton, LayoutHelper.createFrame(44, 44, Gravity.LEFT | Gravity.TOP, 2.66f, 0, 0, 0));
+            searchContainer.addView(searchCalendarButton, LayoutHelper.createFrame(ChatActivityEnterView.DEFAULT_HEIGHT, ChatActivityEnterView.DEFAULT_HEIGHT, Gravity.LEFT | Gravity.TOP, 2.66f, 0, 0, 0));
             searchCalendarButton.setOnClickListener(view -> {
                 if (getParentActivity() == null) {
                     return;
@@ -10852,13 +10863,13 @@ public class ChatActivity extends BaseFragment implements
             float baseTranslationY2 = -windowInsetsStateHolder.getAnimatedMaxBottomInset()
                 - chatInputViewsContainer.getInputBubbleHeight()
                 - getTopicTabsSideSize(TopicsTabsView.Position.BOTTOM)
-                - dp(ChatInputViewsContainer.INPUT_BUBBLE_BOTTOM + 4);
+                - dp(NonIslandHelper.chatElements() ? 4 : ChatInputViewsContainer.INPUT_BUBBLE_BOTTOM + 4);
             sideControlsButtonsLayout.setTranslationY(baseTranslationY2);
         }
 
         if (suggestEmojiPanel != null) {
             float baseTranslationY2 = -windowInsetsStateHolder.getAnimatedMaxBottomInset()
-                - dp(ChatInputViewsContainer.INPUT_BUBBLE_BOTTOM + 7);
+                - dp(NonIslandHelper.chatElements() ? 7 : ChatInputViewsContainer.INPUT_BUBBLE_BOTTOM + 7);
             suggestEmojiPanel.setTranslationY(baseTranslationY2);
         }
     }
@@ -11879,7 +11890,7 @@ public class ChatActivity extends BaseFragment implements
         if (!invalidateChatListViewTopPadding || chatListView == null || (fixedKeyboardHeight > 0 && searchExpandProgress == 0)) {
             return;
         }
-        float pinnedViewH = getTopPanelHeightWithPadding(dp(7))
+        float pinnedViewH = getTopPanelHeightWithPadding(dp(NonIslandHelper.chatElements() ? 0 : 7))
             + (actionBarSearchTags != null ? dp((28 + 7) * actionBarSearchTags.shownT) : 0)
             + (dp(36 + 7) * getHashtagTabsShownT());
 
@@ -11982,7 +11993,7 @@ public class ChatActivity extends BaseFragment implements
         if (isInsideContainer && parentChatActivity == null) {
             paddingBottom = AndroidUtilities.navigationBarHeight;
         } else {
-            paddingBottom = blurredViewBottomOffset + dp(9 + 7)
+            paddingBottom = blurredViewBottomOffset + dp(NonIslandHelper.chatElements() ? 3 : 9 + 7)
                 + inputIslandHeightCurrent
                 + getTopicTabsSideSize(TopicsTabsView.Position.BOTTOM)
                 + windowInsetsStateHolder.getAnimatedMaxBottomInset();
@@ -12017,7 +12028,7 @@ public class ChatActivity extends BaseFragment implements
 
         if (undoView != null) {
             undoView.setAdditionalTranslationY(
-                windowInsetsStateHolder.getAnimatedMaxBottomInset() + dp(9 + 7)
+                windowInsetsStateHolder.getAnimatedMaxBottomInset() + dp(9 + 7 - (NonIslandHelper.chatElements() ? 16 : 0))
                     + chatInputViewsContainer.getInputBubbleHeight() + getTopicTabsSideSize(TopicsTabsView.Position.BOTTOM));
         }
 
@@ -12046,7 +12057,7 @@ public class ChatActivity extends BaseFragment implements
         }
 
         if (topPanelLayout != null) {
-            topPanelLayout.setTranslationY(ty - dp(5) - getTopicTabsSideSize(TopicsTabsView.Position.TOP) * getHashtagTabsShownT());
+            topPanelLayout.setTranslationY(ty - dp(NonIslandHelper.chatElements() ? 0 : 5) - getTopicTabsSideSize(TopicsTabsView.Position.TOP) * getHashtagTabsShownT());
         }
     }
 
@@ -16632,7 +16643,7 @@ public class ChatActivity extends BaseFragment implements
         return getScrollOffsetForMessage(getHeightForMessage(object, !TextUtils.isEmpty(highlightMessageQuote))) - scrollOffsetForQuote(object);
     }
     private int getScrollOffsetForMessage(int messageHeight) {
-        return (int) Math.max(-AndroidUtilities.dp(2), (chatListView.getMeasuredHeight() - blurredViewBottomOffset - chatListViewPaddingTop - windowInsetsStateHolder.getCurrentMaxBottomInset() - dp(44 + 9) - messageHeight) / 2);
+        return (int) Math.max(-AndroidUtilities.dp(2), (chatListView.getMeasuredHeight() - chatListViewPaddingTop - chatListView.getPaddingBottom() - messageHeight) / 2);
     }
 
     private int scrollOffsetForQuote(MessageObject object) {
@@ -17066,6 +17077,10 @@ public class ChatActivity extends BaseFragment implements
     private boolean shouldHaveLightNavigationBarIcons;
 
     public boolean isShouldHaveLightNavigationBarIcons() {
+        if (chatInputViewsContainer != null) {
+            Boolean override = NonIslandHelper.needChatLightNavBar(chatInputViewsContainer.getInputBubbleHeight(), themeDelegate);
+            if (override != null) return override;
+        }
         return shouldHaveLightNavigationBarIcons && (!windowInsetsStateHolder.inAppViewIsVisible() || themeDelegate != null && themeDelegate.isDark);
     }
 
@@ -17637,6 +17652,9 @@ public class ChatActivity extends BaseFragment implements
                     canvas.restore();
                 }
             }
+            if (child == actionBar && parentLayout != null) {
+                NonIslandHelper.drawChatHeaderShadow(parentLayout, canvas, topPanelLayout, mentionContainer, getTopicTabsSideSize(TopicsTabsView.Position.TOP), actionBar.getVisibility() == VISIBLE ? (int) actionBar.getTranslationY() + actionBar.getMeasuredHeight() + (actionBarSearchTags != null ? (int) (actionBarSearchTags.getCurrentHeight() - dp(3) * actionBarSearchTags.shownT) : 0) + (hashtagSearchTabs != null ? hashtagSearchTabs.getCurrentHeight() : 0) : 0);
+            }
             return result;
         }
 
@@ -17655,7 +17673,7 @@ public class ChatActivity extends BaseFragment implements
             float canvasOffsetX = chatListView.getLeft() + cell.getX();
             float canvasOffsetY = chatListView.getY() + cell.getY() + cell.getPaddingTop();
             float alpha = cell.shouldDrawAlphaLayer() ? cell.getAlpha() : 1f;
-            canvas.clipRect(chatListView.getLeft(), listTop, chatListView.getRight(), chatListView.getY() + chatListView.getMeasuredHeight() - blurredViewBottomOffset - windowInsetsStateHolder.getCurrentMaxBottomInset() - inputIslandHeightCurrent - dp(9));
+            canvas.clipRect(chatListView.getLeft(), listTop, chatListView.getRight(), chatListView.getY() + chatListView.getMeasuredHeight() - blurredViewBottomOffset - windowInsetsStateHolder.getCurrentMaxBottomInset() - inputIslandHeightCurrent - dp(NonIslandHelper.chatElements() ? 0 : 9));
             canvas.translate(canvasOffsetX, canvasOffsetY);
             cell.setInvalidatesParent(true);
             if (type == 0) {
@@ -17878,7 +17896,7 @@ public class ChatActivity extends BaseFragment implements
                             float viewClipBottom2 = getMeasuredHeight()
                                     - windowInsetsStateHolder.getCurrentMaxBottomInset()
                                     - inputIslandHeightCurrent
-                                    - dp(9)
+                                    - dp(NonIslandHelper.chatElements() ? 0 : 9)
                                     - (mentionContainer != null ? mentionContainer.clipBottom() : 0);
 
                             canvas.clipRect(0, listTop + (mentionContainer != null ? mentionContainer.clipTop() : 0), getMeasuredWidth(), viewClipBottom2);
@@ -17899,7 +17917,7 @@ public class ChatActivity extends BaseFragment implements
                             - windowInsetsStateHolder.getCurrentMaxBottomInset()
                             - inputIslandHeightCurrent
                             - getTopicTabsSideSize(TopicsTabsView.Position.BOTTOM)
-                            - dp(9);
+                            - dp(NonIslandHelper.chatElements() ? 0 : 9);
 
                         float clipTop = 0, clipBottom = 0;
                         if (mentionContainer != null) {
@@ -18570,12 +18588,12 @@ public class ChatActivity extends BaseFragment implements
                         childTop = chatActivityEnterView.getBottom();
                     }
                 } else if (chatActivityEnterView != null && chatActivityEnterView.isRecordCircleOrControlsView(child)) {
-                    childTop -= windowInsetsStateHolder.getCurrentMaxBottomInset() + dp(7);
-                    childLeft -= dp(3);
+                    childTop -= windowInsetsStateHolder.getCurrentMaxBottomInset() + dp(NonIslandHelper.chatElements() ? -2 : 7);
+                    childLeft -= dp(NonIslandHelper.chatElements() ? -4 : 3);
                 } else if (child == emojiButtonRed) {
-                    childTop -= windowInsetsStateHolder.getCurrentMaxBottomInset() + dp(7);
+                    childTop -= windowInsetsStateHolder.getCurrentMaxBottomInset() + dp(NonIslandHelper.chatElements() ? -2 : 7);
                 } else if (chatActivityEnterView != null && child == chatActivityEnterView.recordedAudioPanel) {
-                    childTop -= windowInsetsStateHolder.getCurrentMaxBottomInset() + dp(9);
+                    childTop -= windowInsetsStateHolder.getCurrentMaxBottomInset() + dp(NonIslandHelper.chatElements() ? 0 : 9);
                 } else if (child == gifHintTextView || child == voiceHintTextView || child == mediaBanTooltip || child == emojiHintTextView) {
                     childTop -= inputFieldHeight;
                 } else if (child == chatListView || child == chatListThanosEffect || child == floatingDateView || child == floatingTopicSeparator || child == infoTopView) {
@@ -18586,7 +18604,7 @@ public class ChatActivity extends BaseFragment implements
                     }
                 } else if (child == actionBar) {
                     childTop -= getPaddingTop();
-                    if (isInPreviewMode()) {
+                    if (isInPreviewMode() && !NonIslandHelper.chatElements()) {
                         childTop += dp(1);
                     }
                 } else if (child == videoPlayerContainer) {
@@ -19421,7 +19439,7 @@ public class ChatActivity extends BaseFragment implements
                 return;
             }
             if (selectedMessagesCountTextView != null && (selectedMessagesIds[0].size() != 0 || selectedMessagesIds[1].size() != 0)) {
-                selectedMessagesCountTextView.setText(LocaleController.formatPluralString("MessagesSelected", selectedMessagesIds[0].size() + selectedMessagesIds[1].size()), true);
+                selectedMessagesCountTextView.setText(NonIslandHelper.chatElements() ? String.valueOf(selectedMessagesIds[0].size() + selectedMessagesIds[1].size()) : LocaleController.formatPluralString("MessagesSelected", selectedMessagesIds[0].size() + selectedMessagesIds[1].size()), true);
             }
         } else {
             int size = selectedMessagesIds[0].size() + selectedMessagesIds[1].size();
@@ -20010,7 +20028,7 @@ public class ChatActivity extends BaseFragment implements
                 }
                 object.clipTopAddition = (int) (chatListViewPaddingTop - chatListViewPaddingVisibleOffset - AndroidUtilities.dp(4));
                 object.clipBottomAddition = (int) (blurredViewBottomOffset
-                    + dp(9)
+                    + dp(NonIslandHelper.chatElements() ? 0 : 9)
                     + windowInsetsStateHolder.getAnimatedMaxBottomInset()
                     + getTopicTabsSideSize(TopicsTabsView.Position.BOTTOM)
                     + inputIslandHeightCurrent);
@@ -29728,7 +29746,7 @@ public class ChatActivity extends BaseFragment implements
 
                 return Math.round(windowInsetsStateHolder.getAnimatedMaxBottomInset()
                     + getTopicTabsSideSize(TopicsTabsView.Position.BOTTOM)
-                    + (chatInputViewsContainer.getInputBubbleHeight() + dp(9 + 7)));
+                    + (chatInputViewsContainer.getInputBubbleHeight() + dp(9 + 7 - (NonIslandHelper.chatElements() ? 16 : 0))));
             }
 
             @Override
@@ -32486,7 +32504,7 @@ public class ChatActivity extends BaseFragment implements
         }
 
         if (selectedMessagesCountTextView != null) {
-            selectedMessagesCountTextView.setText(LocaleController.formatPluralString("MessagesSelected", selectedMessagesIds[0].size() + selectedMessagesIds[1].size()), false);
+            selectedMessagesCountTextView.setText(NonIslandHelper.chatElements() ? String.valueOf(selectedMessagesIds[0].size() + selectedMessagesIds[1].size()) : LocaleController.formatPluralString("MessagesSelected", selectedMessagesIds[0].size() + selectedMessagesIds[1].size()), false);
         }
         updateVisibleRows();
         if (chatActivityEnterView != null) {
@@ -44130,6 +44148,8 @@ public class ChatActivity extends BaseFragment implements
             }
             return ColorUtils.calculateLuminance(color) > 0.7f;
         }
+        Boolean inu_override = NonIslandHelper.needChatLightStatusBar(themeDelegate);
+        if (inu_override != null) return inu_override;
         if (actionBar == null) {
             return !Theme.isCurrentThemeDark();
         }
@@ -46153,7 +46173,7 @@ public class ChatActivity extends BaseFragment implements
         }
 
         final float margin = windowInsetsStateHolder.getAnimatedMaxBottomInset() +
-                (chatInputViewsContainer.getInputBubbleHeight() + dp(9) - dp(5));
+                (chatInputViewsContainer.getInputBubbleHeight() + dp(9 - (NonIslandHelper.chatElements() ? 9 : -dp(5))));
 
         topicsTabs.setSideMenuBackgroundMarginBottom(margin);
     }
@@ -46161,13 +46181,13 @@ public class ChatActivity extends BaseFragment implements
     private void checkUi_botMenuPosition() {
         final float margin = windowInsetsStateHolder.getAnimatedMaxBottomInset()
             + getTopicTabsSideSize(TopicsTabsView.Position.BOTTOM)
-            + (chatInputViewsContainer.getInputBubbleHeight() + dp(9 + 6));
+            + (chatInputViewsContainer.getInputBubbleHeight() + dp(9 + 6 - (NonIslandHelper.chatElements() ? 16 : 0)));
 
         if (chatActivityEnterView != null && chatActivityEnterView.botCommandsMenuContainer != null) {
             chatActivityEnterView.botCommandsMenuContainer.setTranslationY(-margin);
         }
         if (mentionContainer != null) {
-            mentionContainer.setTranslationY(mentionContainer.isReversed() ? dp(5) : -margin);
+            mentionContainer.setTranslationY(mentionContainer.isReversed() ? dp(NonIslandHelper.chatElements() ? 0 : 5) : -margin);
         }
     }
 
@@ -46191,9 +46211,9 @@ public class ChatActivity extends BaseFragment implements
 
     private float calculateInputIslandHeight(boolean target) {
         final float enterViewIslandHeight = Math.max(
-            chatActivityEnterView != null ? chatActivityEnterView.getIslandTotalHeight(target): 0, dp(44));
+            chatActivityEnterView != null ? chatActivityEnterView.getIslandTotalHeight(target): 0, dp(ChatActivityEnterView.DEFAULT_HEIGHT));
 
-        final float defaultIslandHeight = dp(44);
+        final float defaultIslandHeight = dp(ChatActivityEnterView.DEFAULT_HEIGHT);
         final float enterViewFactor;
         float visibility;
         float pollAddVisibility;
@@ -46209,7 +46229,7 @@ public class ChatActivity extends BaseFragment implements
         }
 
         if (!isInsideContainer && !isInPreviewMode()) {
-            return lerp(Math.max(lerp(defaultIslandHeight, enterViewIslandHeight, enterViewFactor) * visibility, dp(44)), -dp(7), pollAddVisibility);
+            return lerp(Math.max(lerp(defaultIslandHeight, enterViewIslandHeight, enterViewFactor) * visibility, dp(ChatActivityEnterView.DEFAULT_HEIGHT)), -dp(7), pollAddVisibility);
         } else {
             return lerp(defaultIslandHeight, enterViewIslandHeight, enterViewFactor) * visibility;
         }
@@ -46227,10 +46247,15 @@ public class ChatActivity extends BaseFragment implements
             return;
         }
 
+        final boolean inu_prevHadBubble = inputIslandHeightCurrent > 0;
         inputIslandHeightCurrent = calculateInputIslandHeight(false);
         inputIslandHeightTarget = calculateInputIslandHeight(true);
 
         chatInputViewsContainer.setInputBubbleHeight(inputIslandHeightCurrent);
+        // input bg covering navbar area changes => re-evaluate nav icon color
+        if (NonIslandHelper.chatElements() && inu_prevHadBubble != (inputIslandHeightCurrent > 0)) {
+            checkSystemBarColors();
+        }
         updatePagedownButtonsPosition();
         updateBotforumTabsBottomMargin();
         checkUi_botMenuPosition();
@@ -46271,6 +46296,10 @@ public class ChatActivity extends BaseFragment implements
         if (parentChatActivity != null) {
             parentChatActivity.checkUi_topFade();
         }
+        if (NonIslandHelper.chatElements()) {
+            chatActivityFadeView.setFadeZoneTop(0);
+            return;
+        }
 
         float fadeHeight = actionBar.getMeasuredHeight();
         fadeHeight += dp(7 - 6);
@@ -46332,6 +46361,10 @@ public class ChatActivity extends BaseFragment implements
                 * (1f - animatorSearchResultAsListVisibility.getFloatValue())
                 * (1f - getHashtagTabsShownT());
 
+            if (NonIslandHelper.chatElements()) {
+                topPanelLayout.setPadding((int) sideMenu, 0, 0, 0);
+                return;
+            }
             topPanelLayout.setPadding(dp(7) + (int) sideMenu, dp(7), dp(7), dp(7));
         }
     }
@@ -46929,7 +46962,7 @@ public class ChatActivity extends BaseFragment implements
     }
 
     private float getTopicTabsSideSize(TopicsTabsView.Position position) {
-        return topicsTabs != null ? topicsTabs.getTabsVisibleSpaceWithPadding(position, dp(7)) : 0;
+        return topicsTabs != null ? topicsTabs.getTabsVisibleSpaceWithPadding(position, dp(NonIslandHelper.chatElements() ? 0 : 7)) : 0;
     }
 
     private OnPostDrawView invalidateBlurredSourcesView;
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java
@@ -2623,7 +2623,7 @@ public class ChatActivityEnterView extends FrameLayout implements
             @Override
             protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
                 super.onMeasure(widthMeasureSpec, heightMeasureSpec);
-                final int height = Math.max(dp(44), getMeasuredHeight());
+                final int height = Math.max(dp(DEFAULT_HEIGHT), getMeasuredHeight());
                 if (animatorInputFieldHeight.getFactor() > 0) {
                     animatorInputFieldHeight.animateTo(height);
                 } else {
@@ -2676,10 +2676,10 @@ public class ChatActivityEnterView extends FrameLayout implements
         };
         emojiButton.setContentDescription(getString(R.string.AccDescrEmojiButton));
         emojiButton.setFocusable(true);
-        int padding = dp(7.5f);
+        int padding = dp(inu_ICON_PADDING);
         emojiButton.setPadding(padding, padding, padding, padding);
         emojiButton.setColorFilter(new PorterDuffColorFilter(getThemedColor(Theme.key_glass_defaultIcon), PorterDuff.Mode.SRC_IN));
-        emojiButton.setBackground(Theme.createInsetRoundRectDrawable(getThemedColor(Theme.key_listSelector), dp(19), dp(1), dp(3)));
+        emojiButton.setBackground(desu.inugram.helpers.theme.NonIslandHelper.createInputButtonSelector(getThemedColor(Theme.key_listSelector)));
         emojiButton.setOnClickListener(v -> {
             if (adjustPanLayoutHelper != null && adjustPanLayoutHelper.animationInProgress()) {
                 return;
@@ -2720,7 +2720,7 @@ public class ChatActivityEnterView extends FrameLayout implements
         deleteRichDraftButton.setScaleType(ImageView.ScaleType.CENTER);
         deleteRichDraftButton.setImageResource(R.drawable.menu_delete_old);
         deleteRichDraftButton.setColorFilter(new PorterDuffColorFilter(getThemedColor(Theme.key_glass_defaultIcon), PorterDuff.Mode.SRC_IN));
-        deleteRichDraftButton.setBackground(Theme.createInsetRoundRectDrawable(getThemedColor(Theme.key_listSelector), dp(19), dp(1), dp(3)));
+        deleteRichDraftButton.setBackground(desu.inugram.helpers.theme.NonIslandHelper.createInputButtonSelector(getThemedColor(Theme.key_listSelector)));
         deleteRichDraftButton.setVisibility(View.GONE);
         deleteRichDraftButton.setContentDescription(getString(R.string.ArticleDeleteDraft));
         deleteRichDraftButton.setOnClickListener(v -> {
@@ -3202,7 +3202,9 @@ public class ChatActivityEnterView extends FrameLayout implements
 
                     canvas.save();
                     canvas.scale(s, s, backgroundRect.centerX(), backgroundRect.centerY());
-                    canvas.drawRoundRect(backgroundRect, r, r, paint);
+                    if (!desu.inugram.helpers.theme.NonIslandHelper.chatElements()) {
+                        canvas.drawRoundRect(backgroundRect, r, r, paint);
+                    }
                     canvas.restore();
                 }
                 super.dispatchDraw(canvas);
@@ -3387,13 +3389,13 @@ public class ChatActivityEnterView extends FrameLayout implements
         cameraOutline = getResources().getDrawable(R.drawable.input_video).mutate();
         cameraOutline.setColorFilter(new PorterDuffColorFilter(getThemedColor(Theme.key_glass_defaultIcon), PorterDuff.Mode.MULTIPLY));
 
-        audioVideoSendButton = new ChatActivityEnterViewAnimatedIconView(context, 24) {
+        audioVideoSendButton = new ChatActivityEnterViewAnimatedIconView(context, desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? 32 : 24) {
             private final Rect tmpRectF = new Rect();
             @Override
             public void draw(@NonNull Canvas canvas) {
                 if (audioVideoButtonContainerForbidden) {
                     tmpRectF.set(0, 0, getMeasuredWidth(), getMeasuredHeight());
-                    tmpRectF.inset(dp(7.5f), dp(7.5f));
+                    tmpRectF.inset(dp(inu_ICON_PADDING), dp(inu_ICON_PADDING));
                     Drawable d = getCurrentState() == State.VIDEO ? cameraOutline : micOutline;
                     d.setBounds(tmpRectF);
                     d.draw(canvas);
@@ -3405,7 +3407,7 @@ public class ChatActivityEnterView extends FrameLayout implements
         audioVideoSendButton.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
 //        audioVideoSendButton.setFocusable(true);
 //        audioVideoSendButton.setAccessibilityDelegate(mediaMessageButtonsDelegate);
-        padding = dp(10f);
+        padding = dp(desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? inu_ICON_PADDING : 10f);
         audioVideoSendButton.setPadding(padding, padding, padding, padding);
         audioVideoButtonContainer.addView(audioVideoSendButton, LayoutHelper.createFrame(DEFAULT_HEIGHT, DEFAULT_HEIGHT));
 
@@ -3435,7 +3437,7 @@ public class ChatActivityEnterView extends FrameLayout implements
             }
         });
 
-        sendButton = new SendButton(context, isInScheduleMode() ? R.drawable.input_schedule : R.drawable.send_plane_24, resourcesProvider, true) {
+        sendButton = new SendButton(context, isInScheduleMode() ? R.drawable.input_schedule : desu.inugram.helpers.theme.NonIslandHelper.chatSendIcon(), resourcesProvider, !desu.inugram.helpers.theme.NonIslandHelper.chatElements()) {
             @Override
             public boolean isInScheduleMode() {
                 return ChatActivityEnterView.this.isInScheduleMode();
@@ -3443,7 +3445,7 @@ public class ChatActivityEnterView extends FrameLayout implements
 
             @Override
             public boolean isOpen() {
-                return messageSendPreview != null && messageSendPreview.isShowing() || super.isOpen();
+                return inu_isSendButtonLongPressed() || super.isOpen();
             }
 
             @Override
@@ -3453,7 +3455,7 @@ public class ChatActivityEnterView extends FrameLayout implements
 
             @Override
             public boolean shouldDrawBackground() {
-                return shouldDrawBackground;
+                return shouldDrawBackground || desu.inugram.helpers.theme.NonIslandHelper.chatElements() && inu_isSendButtonLongPressed();
             }
 
             @Override
@@ -3469,6 +3471,7 @@ public class ChatActivityEnterView extends FrameLayout implements
         sendButton.setScaleY(0.1f);
         sendButton.setAlpha(0.0f);
         sendButtonContainer.addView(sendButton, LayoutHelper.createFrame(100, DEFAULT_HEIGHT, Gravity.RIGHT | Gravity.BOTTOM));
+        desu.inugram.helpers.theme.NonIslandHelper.applySendButtonRipple(sendButton, 100, getThemedColor(Theme.key_listSelector));
         sendButton.setOnClickListener(view -> {
             if ((messageSendPreview != null && messageSendPreview.isShowing()) || (runningAnimationAudio != null && runningAnimationAudio.isRunning()) || moveToSendStateRunnable != null) {
                 return;
@@ -4650,7 +4653,8 @@ public class ChatActivityEnterView extends FrameLayout implements
                 canvas.clipRect(0, separatorY, getMeasuredWidth(), getMeasuredHeight());
             }
             if (child == topView) {
-                canvas.clipRect(0, 0, getMeasuredWidth(), separatorY);
+                final float top = desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? Integer.MIN_VALUE : 0;
+                canvas.clipRect(0, top, getMeasuredWidth(), separatorY);
             }
         }
         boolean result = super.drawChild(canvas, child, drawingTime);
@@ -4726,6 +4730,10 @@ public class ChatActivityEnterView extends FrameLayout implements
     }
 
     private ActionBarMenuSubItem actionScheduleButton;
+    private boolean inu_isSendButtonLongPressed() {
+        return messageSendPreview != null && messageSendPreview.isShowing() || sendPopupWindow != null && sendPopupWindow.isShowing();
+    }
+
     private boolean onSendLongClick(View view) {
         if (isInScheduleMode() || parentFragment != null && parentFragment.getChatMode() == ChatActivity.MODE_QUICK_REPLIES || animatorEphemeralMessageVisibility.getValue()) {
             return false;
@@ -5774,7 +5782,7 @@ public class ChatActivityEnterView extends FrameLayout implements
         messageEditText.setMaxLines(desu.inugram.InuConfig.CHAT_INPUT_MAX_LINES.getValue());
         messageEditText.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 18);
         messageEditText.setGravity(Gravity.BOTTOM);
-        messageEditText.setPadding(0, dp(9), 0, dp(10));
+        messageEditText.setPadding(0, dp(inu_FIELD_PADDING_TOP), 0, dp(inu_FIELD_PADDING_BOTTOM));
         messageEditText.setBackgroundDrawable(null);
         messageEditText.setTextColor(getThemedColor(Theme.key_chat_messagePanelText));
         messageEditText.setLinkTextColor(getThemedColor(Theme.key_chat_messageLinkOut));
@@ -5790,7 +5798,7 @@ public class ChatActivityEnterView extends FrameLayout implements
         richDraftPreview.setMaxHeight(dp(150));
         richDraftPreview.setMinHeight(dp(DEFAULT_HEIGHT + DEFAULT_HEIGHT));
         richDraftPreview.setVisibility(View.GONE);
-        richDraftPreview.setPadding(dp(8), dp(9), dp(8), dp(10));
+        richDraftPreview.setPadding(dp(8), dp(inu_FIELD_PADDING_TOP), dp(8), dp(inu_FIELD_PADDING_BOTTOM));
         richDraftPreview.setOnClickListener(v -> openRichEditor());
         messageEditTextContainer.addView(richDraftPreview, 2, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.BOTTOM, 52 - 8, 0, (isChat ? 50 : 2) - 8, 1.5f));
         messageEditText.setOnKeyListener(new OnKeyListener() {
@@ -6430,7 +6438,10 @@ public class ChatActivityEnterView extends FrameLayout implements
         }
     }
 
-    public static final int DEFAULT_HEIGHT = 44;
+    public static int DEFAULT_HEIGHT = 44;
+    public static int inu_FIELD_PADDING_TOP = 9;
+    public static int inu_FIELD_PADDING_BOTTOM = 10;
+    public static float inu_ICON_PADDING = 7.5f;
 
     private boolean resizeForTopViewLastShow;
     private void resizeForTopView(boolean show) {
@@ -6440,11 +6451,11 @@ public class ChatActivityEnterView extends FrameLayout implements
 
         LayoutParams layoutParams = (LayoutParams) textFieldContainer.getLayoutParams();
         layoutParams.topMargin = (show ? topView.getLayoutParams().height : 0);
-        layoutParams.topMargin += dp(9); // for prevent clipping
+        layoutParams.topMargin += dp(desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? 0 : 9); // for prevent clipping
         textFieldContainer.setLayoutParams(layoutParams);
 
         resizeForTopViewLastShow = show;
-        setMinimumHeight(dp(44) + (show ? topView.getLayoutParams().height : 0));
+        setMinimumHeight(dp(DEFAULT_HEIGHT) + (show ? topView.getLayoutParams().height : 0));
         if (stickersExpanded) {
             if (searchingType == 0) {
                 setStickersExpanded(false, true, false);
@@ -6539,7 +6550,7 @@ public class ChatActivityEnterView extends FrameLayout implements
 
         audioVideoButtonContainer.setAlpha(audioVideoButtonContainerForbidden ? 0.5f : 1.0f);
         audioVideoButtonContainer.invalidate();
-        audioVideoSendButton.setColorFilter(new PorterDuffColorFilter(audioVideoButtonContainerForbidden ?
+        audioVideoSendButton.setColorFilter(new PorterDuffColorFilter(audioVideoButtonContainerForbidden || desu.inugram.helpers.theme.NonIslandHelper.chatElements() ?
             getThemedColor(Theme.key_glass_defaultIcon) : Color.WHITE, PorterDuff.Mode.SRC_IN));
         audioVideoSendButton.invalidate();
         updateFieldHint(false);
@@ -8719,7 +8730,7 @@ public class ChatActivityEnterView extends FrameLayout implements
         slowModeButton.setVisibility(visible ? VISIBLE : GONE);
         int padding = visible ? dp(slowModeButton.isPremiumMode ? 26 : 16) : 0;
         if (messageEditText != null && messageEditText.getPaddingRight() != padding) {
-            messageEditText.setPadding(0, dp(9), padding, dp(10));
+            messageEditText.setPadding(0, dp(inu_FIELD_PADDING_TOP), padding, dp(inu_FIELD_PADDING_BOTTOM));
         }
     }
 
@@ -9182,8 +9193,8 @@ public class ChatActivityEnterView extends FrameLayout implements
 
                     FrameLayout.LayoutParams newLayoutParams = new FrameLayout.LayoutParams(parent.getMeasuredWidth() - (editingMessageObject == null ? Math.max(0, sendButton.width() - dp(DEFAULT_HEIGHT)) : 0), dp(DEFAULT_HEIGHT));
                     newLayoutParams.gravity = Gravity.BOTTOM;
-                    newLayoutParams.leftMargin = dp(7);
-                    newLayoutParams.rightMargin = dp(7);
+                    newLayoutParams.leftMargin = dp(desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? 0 : 7);
+                    newLayoutParams.rightMargin = dp(desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? 0 : 7);
                     sizeNotifierLayout.addView(recordedAudioPanel, newLayoutParams);
                     videoTimelineView.setVisibility(GONE);
                 } else {
@@ -10364,8 +10375,9 @@ public class ChatActivityEnterView extends FrameLayout implements
         emojiButton.setColorFilter(new PorterDuffColorFilter(getThemedColor(Theme.key_glass_defaultIcon), PorterDuff.Mode.SRC_IN));
         emojiButton.setBackground(Theme.createSelectorDrawable(getThemedColor(Theme.key_listSelector)));
         deleteRichDraftButton.setColorFilter(new PorterDuffColorFilter(getThemedColor(Theme.key_glass_defaultIcon), PorterDuff.Mode.SRC_IN));
-        deleteRichDraftButton.setBackground(Theme.createInsetRoundRectDrawable(getThemedColor(Theme.key_listSelector), dp(19), dp(1), dp(3)));
+        deleteRichDraftButton.setBackground(desu.inugram.helpers.theme.NonIslandHelper.createInputButtonSelector(getThemedColor(Theme.key_listSelector)));
         sendOutlineView.setColorFilter(getThemedColor(Theme.key_telegram_color), PorterDuff.Mode.SRC_IN);
+        desu.inugram.helpers.theme.NonIslandHelper.applySendButtonRipple(sendButton, 100, getThemedColor(Theme.key_listSelector));
     }
 
     private void updateRecordedDeleteIconColors() {
@@ -15074,10 +15086,12 @@ public class ChatActivityEnterView extends FrameLayout implements
             final float appear = this.appear.set(1);
             if (openProgress < 1) {
                 canvas.save();
+                if (!desu.inugram.helpers.theme.NonIslandHelper.chatElements()) {
                 canvas.translate(-dp(24) * (1f - appear), dp(24) * (1f - appear));
                 final float s = lerp(0.35f, 1.0f, appear);
                 canvas.scale(s, s, x + drawable.getIntrinsicWidth() / 2f, y + drawable.getIntrinsicHeight() / 2f);
                 canvas.rotate(60 * (1f - appear), x + drawable.getIntrinsicWidth() / 2f, y + drawable.getIntrinsicHeight() / 2f);
+                }
                 drawable.setBounds(x, y, x + drawable.getIntrinsicWidth(), y + drawable.getIntrinsicHeight());
                 drawable.setAlpha((int) (0xFF * (1.0f - priceProgress)));
                 drawable.draw(canvas);
@@ -15517,9 +15531,11 @@ public class ChatActivityEnterView extends FrameLayout implements
         final float visibility = animatorTopViewVisibility.getFloatValue();
 
         if (topView != null) {
-            final float y = getMeasuredHeight() - animatorInputFieldHeight.getFactor();
-
-            topView.setTranslationY(y - topView.getMeasuredHeight() * visibility);
+            final float topH = topView.getLayoutParams().height;
+            final float topMargin = visibility > 0 ? (topH + dp(desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? 0 : 9)) : 0;
+            final float fieldDelta = animatorInputFieldHeight.getToFactor() - animatorInputFieldHeight.getFactor();
+            final float baseY = topMargin + textFieldContainer.getPaddingTop() + fieldDelta;
+            topView.setTranslationY(baseY - topH * visibility);
             topView.setVisibility(visibility > 0 ? VISIBLE : GONE);
         }
 
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterViewAnimatedIconView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterViewAnimatedIconView.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterViewAnimatedIconView.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterViewAnimatedIconView.java
@@ -15,6 +15,15 @@ public class ChatActivityEnterViewAnimatedIconView extends RLottieImageView {
     private State currentState;
     private TransitState animatingState;
     private final int sizeDp;
+    public boolean inu_legacy = desu.inugram.helpers.theme.NonIslandHelper.chatElements();
+
+    private int inu_resource(TransitState state) {
+        if (inu_legacy) {
+            if (state == TransitState.VOICE_TO_VIDEO) return R.raw.inu_voice_to_video;
+            if (state == TransitState.VIDEO_TO_VOICE) return R.raw.inu_video_to_voice;
+        }
+        return state.resource;
+    }
 
     private Map<TransitState, RLottieDrawable> stateMap = new HashMap<TransitState, RLottieDrawable>() {
         @Nullable
@@ -23,7 +32,7 @@ public class ChatActivityEnterViewAnimatedIconView extends RLottieImageView {
             RLottieDrawable obj = super.get(key);
             if (obj == null) {
                 TransitState state = (TransitState) key;
-                int res = state.resource;
+                int res = inu_resource(state);
                 return new RLottieDrawable(res, String.valueOf(res), AndroidUtilities.dp(sizeDp), AndroidUtilities.dp(sizeDp));
             }
             return obj;
@@ -49,7 +58,7 @@ public class ChatActivityEnterViewAnimatedIconView extends RLottieImageView {
             RLottieDrawable drawable = stateMap.get(getAnyState(currentState));
             drawable.stop();
 
-            drawable.setProgress(state == State.VOICE ? 0.5f : 0, false);
+            drawable.setProgress(!inu_legacy && state == State.VOICE ? 0.5f : 0, false);
             setAnimation(drawable);
         } else {
             TransitState transitState = getState(fromState, currentState);
@@ -60,10 +69,10 @@ public class ChatActivityEnterViewAnimatedIconView extends RLottieImageView {
             animatingState = transitState;
             RLottieDrawable drawable = stateMap.get(transitState);
             drawable.stop();
-            if (transitState == TransitState.VIDEO_TO_VOICE) {
+            if (!inu_legacy && transitState == TransitState.VIDEO_TO_VOICE) {
                 drawable.setCustomEndFrame(30);
                 drawable.setProgress(0, false);
-            } else if (transitState == TransitState.VOICE_TO_VIDEO) {
+            } else if (!inu_legacy && transitState == TransitState.VOICE_TO_VIDEO) {
                 drawable.setCustomEndFrame(60);
                 drawable.setProgress(0.5f, false);
             } else {
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityTopPanelLayout.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityTopPanelLayout.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityTopPanelLayout.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityTopPanelLayout.java
@@ -17,6 +17,7 @@ import androidx.annotation.NonNull;
 import org.telegram.ui.ActionBar.Theme;
 import org.telegram.ui.Components.blur3.drawable.BlurredBackgroundDrawable;
 
+import desu.inugram.helpers.theme.NonIslandHelper;
 import me.vkryl.android.animator.ListAnimator;
 
 public class ChatActivityTopPanelLayout extends AnimatedLinearLayout {
@@ -64,18 +65,18 @@ public class ChatActivityTopPanelLayout extends AnimatedLinearLayout {
 
     private void checkBoundsAndClipping() {
         final float bgHeight = getMetadata().getTotalHeight();
-        final float bgAlpha = getMetadata().getTotalVisibility();
+        final float bgAlpha = NonIslandHelper.chatElements() ? 1 : getMetadata().getTotalVisibility();
 
         clipRectF.set(getPaddingLeft(), getPaddingTop(), getMeasuredWidth() - getPaddingRight(), getPaddingTop() + bgHeight);
 
-        final float r = Math.min(dp(18), Math.min(clipRectF.width(), clipRectF.height()) / 2f);
+        final float r = NonIslandHelper.chatElements() ? 0 : Math.min(dp(18), Math.min(clipRectF.width(), clipRectF.height()) / 2f);
         clipPath.rewind();
         clipPath.addRoundRect(clipRectF, r, r, Path.Direction.CW);
 
         if (backgroundDrawable != null) {
             backgroundDrawable.setAlpha((int) (bgAlpha * 255));
             backgroundDrawable.setBounds(getPaddingLeft() - dp(7), 0, getMeasuredWidth() - getPaddingRight() + dp(7), getPaddingTop() + getPaddingBottom() + (int) bgHeight);
-            backgroundDrawable.setRadius(Math.min(dp(18), bgHeight / 2));
+            if (!NonIslandHelper.chatElements()) backgroundDrawable.setRadius(Math.min(dp(18), bgHeight / 2));
         }
     }
 
@@ -168,6 +169,15 @@ public class ChatActivityTopPanelLayout extends AnimatedLinearLayout {
         }
 
         super.dispatchDraw(canvas);
+        if (NonIslandHelper.chatElements() && getEntriesCount() > 0) {
+            // top divider
+            canvas.drawLine(0, getPaddingTop(), getWidth(), getPaddingTop(), Theme.dividerPaint);
+            final ListAnimator.Entry<?> entry = getEntry(0);
+            final int wasAlpha = Theme.dividerPaint.getAlpha();
+            Theme.dividerPaint.setAlpha((int) (entry.getVisibility() * Math.min(1, entry.getPosition())));
+            canvas.drawLine(0, getPaddingTop(), getWidth(), getPaddingTop(), Theme.dividerPaint);
+            Theme.dividerPaint.setAlpha(wasAlpha);
+        }
         canvas.restore();
     }
 }
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlert.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlert.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlert.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlert.java
@@ -181,6 +181,7 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Objects;
 
+import desu.inugram.helpers.theme.NonIslandHelper;
 import me.vkryl.android.animator.BoolAnimator;
 import me.vkryl.android.animator.FactorAnimator;
 import me.vkryl.android.animator.ListAnimator;
@@ -2096,6 +2097,9 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N
 
             @Override
             public void drawBlurRect(Canvas canvas, float y, Rect rectTmp, Paint blurScrimPaint, boolean top) {
+                if (NonIslandHelper.chatElements()) {
+                    canvas.drawRect(rectTmp, blurScrimPaint);
+                }
             }
 
             @Override
@@ -2588,6 +2592,16 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N
                 super.setTranslationY(translationY);
                 currentAttachLayout.onButtonsTranslationYUpdated();
             }
+
+            private final desu.inugram.ui.BlurBehindHelper inu_blurHelper = NonIslandHelper.chatElements()
+                ? desu.inugram.ui.BlurBehindHelper.create(this, sizeNotifierFrameLayout, Theme.key_dialogBackground, false, NonIslandHelper.ATTACH_TAB_SHADOW_DP, 0f)
+                : null;
+
+            @Override
+            protected void dispatchDraw(@NonNull Canvas canvas) {
+                if (inu_blurHelper != null) inu_blurHelper.draw(canvas);
+                super.dispatchDraw(canvas);
+            }
         };
         buttonsRecyclerView = new RecyclerListView(context) {
             private final BoolAnimator hasFadeLeft = new BoolAnimator(this, CubicBezierInterpolator.EASE_OUT_QUINT, 320L);
@@ -2616,6 +2630,9 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N
 
             @Override
             public boolean drawChild(Canvas canvas, View child, long drawingTime) {
+                if (NonIslandHelper.chatElements()) {
+                    return super.drawChild(canvas, child, drawingTime);
+                }
                 final float left = child.getX();
                 final float right = left + child.getWidth();
                 final boolean isFadedLeft = left < dp(10);
@@ -2734,6 +2751,8 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N
         buttonsRecyclerView.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
         buttonsRecyclerViewWrapper.addView(buttonsRecyclerView, LayoutHelper.createFrameMatchParent());
         containerView.addView(buttonsRecyclerViewWrapper, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 70, Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL));
+        NonIslandHelper.applyChatAttachTabBar(buttonsRecyclerViewWrapper, buttonsRecyclerView);
+        desu.inugram.helpers.chat.VoiceRecorderHelper.addFab(this, (FrameLayout) containerView, resourcesProvider);
         buttonsRecyclerView.setOnItemClickListener((view, position) -> {
             BaseFragment lastFragment = baseFragment;
             if (lastFragment == null) {
@@ -4073,6 +4092,7 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N
         passcodeView = new PasscodeView(context);
         containerView.addView(passcodeView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
 
+        actionBar.inu_nonIsland = NonIslandHelper.chatElements();
         actionBar.setupGlass(iBlur3FactoryLiquidGlass, BlurredBackgroundProviderImpl.attachMenuActionBar(resourcesProvider));
         animatorCurrentVisibleLayout.replace((long) LAYOUT_TYPE_PHOTO, false);
     }
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAvatarContainer.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAvatarContainer.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAvatarContainer.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAvatarContainer.java
@@ -749,6 +749,7 @@ public class ChatAvatarContainer extends FrameLayout implements FactorAnimator.T
 
     private boolean glassMode;
     public void setGlassMode() {
+        if (desu.inugram.helpers.theme.NonIslandHelper.chatElements()) return;
         if (titleTextView != null) {
             titleTextView.setTextSizePx(dp(17.5f));
         }
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/DialogsActivityTopPanelLayout.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/DialogsActivityTopPanelLayout.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/DialogsActivityTopPanelLayout.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/DialogsActivityTopPanelLayout.java
@@ -19,6 +19,8 @@ import org.telegram.ui.Components.blur3.drawable.BlurredBackgroundDrawable;
 import me.vkryl.android.animator.ListAnimator;
 
 public class DialogsActivityTopPanelLayout extends AnimatedLinearLayout {
+    public desu.inugram.ui.BlurBehindHelper inu_blurHelper;
+
     public DialogsActivityTopPanelLayout(@NonNull Context context) {
         super(context);
 
@@ -60,7 +62,7 @@ public class DialogsActivityTopPanelLayout extends AnimatedLinearLayout {
 
         clipRectF.set(getPaddingLeft(), getPaddingTop(), getMeasuredWidth() - getPaddingRight(), getPaddingTop() + bgHeight);
 
-        final float r = Math.min(dp(defaultRadiusDp), Math.min(clipRectF.width(), clipRectF.height()) / 2f);
+        final float r = inu_blurHelper != null ? 0 : Math.min(dp(defaultRadiusDp), Math.min(clipRectF.width(), clipRectF.height()) / 2f);
         clipPath.rewind();
         clipPath.addRoundRect(clipRectF, r, r, Path.Direction.CW);
 
@@ -100,7 +102,9 @@ public class DialogsActivityTopPanelLayout extends AnimatedLinearLayout {
     protected void dispatchDraw(@NonNull Canvas canvas) {
         if (getMetadata().getTotalVisibility() == 0) return;
 
-        if (backgroundDrawable != null) {
+        if (inu_blurHelper != null) {
+            inu_blurHelper.draw(canvas, (int) getAnimatedHeightWithPadding(0), (int) (getMetadata().getTotalVisibility() * 255));
+        } else if (backgroundDrawable != null) {
             backgroundDrawable.draw(canvas);
         }
 
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/FilterTabsView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/FilterTabsView.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/FilterTabsView.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/FilterTabsView.java
@@ -1084,6 +1084,9 @@ public class FilterTabsView extends FrameLayout {
         listView.setSelectorType(9);
         listView.setSelectorRadius(6);
         listView.setSelectorDrawableColor(Theme.getColor(selectorColorKey, resourcesProvider));
+        if (desu.inugram.helpers.theme.NonIslandHelper.foldersBar()) {
+            desu.inugram.helpers.theme.NonIslandHelper.applyMd3TabsStyle(selectorDrawable, listView, Theme.getColor(selectorColorKey, resourcesProvider));
+        }
         listView.setLayoutManager(layoutManager = new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false) {
 
             @Override
@@ -1538,15 +1541,20 @@ public class FilterTabsView extends FrameLayout {
 
             final float add = additionalTabWidth / 2f;
 
-            final int y = height / 2 - dp(14);
-            selectorDrawable.setBounds((int) (indicatorX - dp(FolderHelper.getTabInternalPadding()) - add), y, (int) (indicatorX + indicatorWidth + dp(FolderHelper.getTabInternalPadding()) + add), y + dp(28));
-            selectorDrawable.setAlpha(31);
+            if (desu.inugram.helpers.theme.NonIslandHelper.foldersBar()) {
+                desu.inugram.helpers.theme.NonIslandHelper.setMd3TabIndicatorBounds(selectorDrawable, indicatorX, indicatorWidth, height, 0f);
+            } else {
+                final int y = height / 2 - dp(14);
+                selectorDrawable.setBounds((int) (indicatorX - dp(FolderHelper.getTabInternalPadding()) - add), y, (int) (indicatorX + indicatorWidth + dp(FolderHelper.getTabInternalPadding()) + add), y + dp(28));
+                selectorDrawable.setAlpha(31);
+            }
             selectorDrawable.draw(canvas);
             canvas.restore();
         }
     }
 
     private final Path clipPath = new Path();
+    public desu.inugram.ui.BlurBehindHelper inu_blurHelper;
 
     @Override
     protected void onSizeChanged(int w, int h, int oldw, int oldh) {
@@ -1558,6 +1566,11 @@ public class FilterTabsView extends FrameLayout {
 
     @Override
     protected void dispatchDraw(@NonNull Canvas canvas) {
+        if (inu_blurHelper != null) {
+            inu_blurHelper.draw(canvas);
+            super.dispatchDraw(canvas);
+            return;
+        }
         canvas.save();
         canvas.clipPath(clipPath);
         super.dispatchDraw(canvas);
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/FragmentSearchField.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/FragmentSearchField.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/FragmentSearchField.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/FragmentSearchField.java
@@ -66,6 +66,7 @@ public class FragmentSearchField extends FrameLayout implements FactorAnimator.T
     private boolean closeButtonForcedVisible;
     public final EditTextBoldCursor editText;
     private BlurredBackgroundDrawable blurredBackgroundDrawable;
+    public desu.inugram.ui.BlurBehindHelper inu_blurHelper;
 
     public FragmentSearchField(Context context, Theme.ResourcesProvider resourcesProvider) {
         super(context);
@@ -183,7 +184,8 @@ public class FragmentSearchField extends FrameLayout implements FactorAnimator.T
     @Override
     protected void dispatchDraw(@NonNull Canvas canvas) {
         canvas.save();
-        if (bg != null) {
+        if (inu_blurHelper != null) inu_blurHelper.draw(canvas);
+        if (inu_blurHelper == null && bg != null) {
             bg.setBounds(
                 getPaddingLeft(),
                 getPaddingTop(),
@@ -205,8 +207,10 @@ public class FragmentSearchField extends FrameLayout implements FactorAnimator.T
     }
 
     public void setupBlurredBackground(BlurredBackgroundDrawable drawable) {
-        drawable.setRadius(dp(20));
-        drawable.setPadding(dp(4));
+        if (drawable != null) {
+            drawable.setRadius(dp(20));
+            drawable.setPadding(dp(4));
+        }
         blurredBackgroundDrawable = drawable;
     }
 
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/MediaActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/MediaActivity.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/MediaActivity.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/MediaActivity.java
@@ -1069,7 +1069,7 @@ public class MediaActivity extends BaseFragment implements SharedMediaLayout.Sha
         if (sharedMediaLayout.getSearchOptionsItem() != null) {
             sharedMediaLayout.getSearchOptionsItem().setColorFilter(new PorterDuffColorFilter(getThemedColor(Theme.key_windowBackgroundWhiteBlackText), PorterDuff.Mode.SRC_IN));
         }
-        actionBar.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundGray));
+        actionBar.setBackgroundColor(Theme.getColor(desu.inugram.helpers.theme.NonIslandHelper.sharedMediaTabs() ? Theme.key_actionBarDefault : Theme.key_windowBackgroundGray));
         actionBar.setItemsColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText), false);
         actionBar.setItemsColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText), true);
         actionBar.setItemsBackgroundColor(Theme.getColor(Theme.key_actionBarActionModeDefaultSelector), false);
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/MentionsContainerView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/MentionsContainerView.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/MentionsContainerView.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/MentionsContainerView.java
@@ -54,6 +54,7 @@ import org.telegram.ui.ContentPreviewViewer;
 import org.telegram.ui.PhotoViewer;
 
 import java.util.ArrayList;
+import desu.inugram.helpers.theme.NonIslandHelper;
 
 public class MentionsContainerView extends FrameLayout implements NotificationCenter.NotificationCenterDelegate {
 
@@ -935,8 +936,8 @@ public class MentionsContainerView extends FrameLayout implements NotificationCe
 
     public void setBackgroundDrawable(@NonNull BlurredBackgroundDrawable backgroundDrawable) {
         this.backgroundDrawable = backgroundDrawable;
-        this.backgroundDrawable.setRadius(dp(22));
-        this.backgroundDrawable.setPadding(dp(5));
+        this.backgroundDrawable.setRadius(dp(NonIslandHelper.chatElements() ? 0 : 22));
+        this.backgroundDrawable.setPadding(dp(NonIslandHelper.chatElements() ? 0 : 5));
 
         checkListViewPadding();
     }
@@ -973,9 +974,9 @@ public class MentionsContainerView extends FrameLayout implements NotificationCe
         if (backgroundDrawable != null) {
             backgroundDrawable.setBounds(
                 0,
-                (int) containerTop - dp(5),
+                (int) containerTop - dp(NonIslandHelper.chatElements() ? 0 : 5),
                 getMeasuredWidth(),
-                (int) containerBottom + dp(5)
+                (int) containerBottom + dp(NonIslandHelper.chatElements() ? 0 : 5)
             );
 
 
@@ -984,14 +985,14 @@ public class MentionsContainerView extends FrameLayout implements NotificationCe
             if (isGif()) {
                 clipBounds.inset(dp(2), dp(2));
                 clipPath.addRoundRect(clipBounds,
-                    dp(20),
-                    dp(20),
+                    dp(NonIslandHelper.chatElements() ? 0 : 20),
+                    dp(NonIslandHelper.chatElements() ? 0 : 20),
                     Path.Direction.CW
                 );
             } else {
                 clipPath.addRoundRect(clipBounds,
-                    dp(22),
-                    dp(22),
+                    dp(NonIslandHelper.chatElements() ? 0 : 22),
+                    dp(NonIslandHelper.chatElements() ? 0 : 22),
                     Path.Direction.CW
                 );
             }
@@ -1012,7 +1013,7 @@ public class MentionsContainerView extends FrameLayout implements NotificationCe
         }
 
         final boolean isGif = isGif();
-        if (backgroundDrawable == null) {
+        if (backgroundDrawable == null || NonIslandHelper.chatElements()) {
             listView.setPadding(0, 0, 0, 0);
         } else {
             listView.setPadding(dp(isGif ? 7 : 5), isGif ? dp(2) : 0, dp(isGif ? 7 : 5), isGif ? dp(2) : 0);
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/RecyclerListView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/RecyclerListView.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/RecyclerListView.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/RecyclerListView.java
@@ -1702,6 +1702,8 @@ public class RecyclerListView extends RecyclerView implements IBlur3Capture {
             selectorDrawable = Theme.createRadSelectorDrawable(color, selectorRadius, 0);
         } else if (selectorType == 9) {
             selectorDrawable = null;
+        } else if (selectorType == 42) {
+            selectorDrawable = Theme.createRadSelectorDrawable(color, selectorRadius, selectorRadius);
         } else if (topBottomSelectorRadius > 0) {
             selectorDrawable = Theme.createRadSelectorDrawable(color, topBottomSelectorRadius, topBottomSelectorRadius);
         } else if (selectorRadius > 0 && selectorType != Theme.RIPPLE_MASK_CIRCLE_20DP) {
@@ -2392,10 +2394,15 @@ public class RecyclerListView extends RecyclerView implements IBlur3Capture {
         selectorView = sel;
         if (selectorType == 8) {
             Theme.setMaskDrawableRad(selectorDrawable, selectorRadius, 0);
+        } else if (selectorType == 42) {
+            Theme.setMaskDrawableRad(selectorDrawable, selectorRadius, selectorRadius);
         } else if (topBottomSelectorRadius > 0 && getAdapter() != null) {
             Theme.setMaskDrawableRad(selectorDrawable, position == 0 ? topBottomSelectorRadius : 0, position == getAdapter().getItemCount() - 2 ? topBottomSelectorRadius : 0);
         }
         selectorRect.set(sel.getLeft(), sel.getTop(), sel.getRight(), sel.getBottom() - bottomPadding);
+        if (selectorType == 42) {
+            desu.inugram.helpers.theme.NonIslandHelper.adjustMd3TabSelectorRect(selectorRect);
+        }
 //        selectorRect.offset((int) sel.getTranslationX(), (int) sel.getTranslationY());
 
         final boolean enabled = sel.isEnabled();
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ScrollSlidingTextTabStrip.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ScrollSlidingTextTabStrip.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ScrollSlidingTextTabStrip.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ScrollSlidingTextTabStrip.java
@@ -450,6 +450,24 @@ public class ScrollSlidingTextTabStrip extends HorizontalScrollView implements T
         backgroundDrawable.setCallback(this);
     }
 
+    public boolean inu_nonIsland;
+    public desu.inugram.ui.BlurBehindHelper inu_blurBehindHelper;
+    public void inu_makeNonIsland(desu.inugram.ui.BlurBehindHelper blurBehindHelper) {
+        inu_nonIsland = true;
+        inu_blurBehindHelper = blurBehindHelper;
+        setPadding(0, 0, 0, 0);
+        setClipToPadding(false);
+        tabsContainer.setPadding(0, 0, 0, 0);
+        backgroundDrawable.setRadius(0);
+        backgroundDrawable.setPadding(0);
+        float rad = AndroidUtilities.dpf2(3);
+        selectorDrawable.setCornerRadii(new float[]{rad, rad, rad, rad, 0, 0, 0, 0});
+        updateColors();
+        checkBoundsAndClipping();
+    }
+
+    public desu.inugram.ui.TabsPillDrawer inu_pill;
+
     public final Path clipPath = new Path();
     private final RectF prevRect = new RectF();
     private final RectF rect = new RectF();
@@ -458,6 +476,7 @@ public class ScrollSlidingTextTabStrip extends HorizontalScrollView implements T
     private final AnimatedFloat open = new AnimatedFloat(this, 420, CubicBezierInterpolator.EASE_OUT_QUINT);
 
     private void checkBoundsAndClipping() {
+        if (inu_nonIsland) return;
         final float rectT = this.rectT.set(1f);
         rect.set(getPaddingLeft(), 0, getMeasuredWidth() - getPaddingRight(), getMeasuredHeight());
         rect.inset(dp(7), dp(7));
@@ -655,15 +674,29 @@ public class ScrollSlidingTextTabStrip extends HorizontalScrollView implements T
             TextView tab = (TextView) tabsContainer.getChildAt(a);
             tab.setTextColor(processColor(Theme.getColor(currentPosition == a ? activeTextColorKey : unactiveTextColorKey, resourcesProvider)));
 //            tab.setBackground(Theme.createSelectorDrawable(Theme.multAlpha(processColor(Theme.getColor(activeTextColorKey, resourcesProvider)), .15f), 3));
-            tab.setBackground(
-                new InsetDrawable(
-                    Theme.createSelectorDrawable(Theme.multAlpha(processColor(Theme.getColor(activeTextColorKey, resourcesProvider)), .15f), Theme.RIPPLE_MASK_ROUNDRECT_6DP, dp(14)),
-                    dp(4), dp(4), dp(4), dp(4)
-                )
-            );
+            if (inu_nonIsland) {
+                tab.setBackground(
+                    new desu.inugram.ui.LabelRippleDrawable(
+                        tab,
+                        Theme.createSelectorDrawable(Theme.multAlpha(processColor(Theme.getColor(activeTextColorKey, resourcesProvider)), .15f), Theme.RIPPLE_MASK_ROUNDRECT_6DP, dp(16)),
+                        dp(12), dp(6)
+                    )
+                );
+            } else {
+                tab.setBackground(
+                    new InsetDrawable(
+                        Theme.createSelectorDrawable(Theme.multAlpha(processColor(Theme.getColor(activeTextColorKey, resourcesProvider)), .15f), Theme.RIPPLE_MASK_ROUNDRECT_6DP, dp(14)),
+                        dp(4), dp(4), dp(4), dp(4)
+                    )
+                );
+            }
         }
 //        selectorDrawable.setColor(processColor(Theme.getColor(tabLineColorKey, resourcesProvider)));
-        selectorDrawable.setColor(Theme.multAlpha(processColor(Theme.getColor(activeTextColorKey, resourcesProvider)), .15f));
+        if (inu_nonIsland) {
+            selectorDrawable.setColor(processColor(Theme.getColor(tabLineColorKey, resourcesProvider)));
+        } else {
+            selectorDrawable.setColor(Theme.multAlpha(processColor(Theme.getColor(activeTextColorKey, resourcesProvider)), .15f));
+        }
         invalidate();
     }
 
@@ -696,6 +729,20 @@ public class ScrollSlidingTextTabStrip extends HorizontalScrollView implements T
 
     @Override
     protected void dispatchDraw(@NonNull Canvas canvas) {
+        if (inu_pill != null) {
+            inu_pill.drawBackgroundAndClip(canvas, processColor(Theme.getColor(Theme.key_windowBackgroundWhite, resourcesProvider)));
+            super.dispatchDraw(canvas);
+            canvas.restore();
+            return;
+        }
+        if (inu_nonIsland) {
+            canvas.save();
+            canvas.translate(getScrollX(), 0);
+            inu_blurBehindHelper.draw(canvas);
+            canvas.restore();
+            super.dispatchDraw(canvas);
+            return;
+        }
         canvas.save();
         if (backgroundDrawable != null) {
             if (rectT.set(1f) < 1) {
@@ -714,6 +761,7 @@ public class ScrollSlidingTextTabStrip extends HorizontalScrollView implements T
 
     private boolean isOpen = true;
     public void setOpen(boolean open) {
+        if (inu_nonIsland || inu_pill != null) return;
         if (open == isOpen) return;
 
         isOpen = open;
@@ -739,7 +787,7 @@ public class ScrollSlidingTextTabStrip extends HorizontalScrollView implements T
             final boolean result = super.drawChild(canvas, child, drawingTime);
 
             final int height = getMeasuredHeight();
-            float l = indicatorX + indicatorXAnimationDx;
+            float l = indicatorX + indicatorXAnimationDx + tabsContainer.getTranslationX();
             float r = l + indicatorWidth + indicatorWidthAnimationDx;
 
             final View current = tabsContainer.getChildAt(currentPosition);
@@ -755,12 +803,34 @@ public class ScrollSlidingTextTabStrip extends HorizontalScrollView implements T
 //                (int) r,
 //                height
 //            );
+            if (inu_pill != null) {
+                final float t = inu_pill.getDockedProgress();
+                final float centerX = getPaddingLeft() + l + (r - l) / 2f;
+                final float barHalf = Math.max(dp(24), inu_currentLabelWidth()) / 2f;
+                final float pillHalf = (r - l) / 2f - dp(4);
+                final float half = AndroidUtilities.lerp(pillHalf, barHalf, t);
+                final float dockExtra = t * dp(4);
+                final float top = AndroidUtilities.lerp(getPaddingTop() + dp(4), height - getPaddingBottom() - dp(3), t) + dockExtra;
+                final float bottom = AndroidUtilities.lerp(height - getPaddingBottom() - dp(4), height - getPaddingBottom(), t) + dockExtra;
+                final float topRad = AndroidUtilities.lerp(dp(14), dp(3), t);
+                final float botRad = AndroidUtilities.lerp(dp(14), 0, t);
+                selectorDrawable.setCornerRadii(new float[]{topRad, topRad, topRad, topRad, botRad, botRad, botRad, botRad});
+                selectorDrawable.setColor(androidx.core.graphics.ColorUtils.blendARGB(
+                    Theme.multAlpha(processColor(Theme.getColor(activeTextColorKey, resourcesProvider)), .15f),
+                    processColor(Theme.getColor(tabLineColorKey, resourcesProvider)),
+                    t
+                ));
+                selectorDrawable.setBounds((int) (centerX - half), (int) top, (int) (centerX + half), (int) bottom);
+            } else if (inu_nonIsland) {
+                desu.inugram.helpers.theme.NonIslandHelper.setMd3TabIndicatorBounds(selectorDrawable, getPaddingLeft() + l, r - l, height, 0f);
+            } else {
             selectorDrawable.setBounds(
                 getPaddingLeft() + (int) l + dp(4),
                 getPaddingTop() + dp(4),
                 getPaddingLeft() + (int) r - dp(4),
                 height - getPaddingBottom() - dp(4)
             );
+            }
             selectorDrawable.draw(canvas);
             selectorDrawable.setAlpha(wasAlpha);
 
@@ -936,8 +1006,38 @@ public class ScrollSlidingTextTabStrip extends HorizontalScrollView implements T
         }
     }
 
+    private float inu_labelWidth(View child) {
+        if (child instanceof TextView) {
+            Layout layout = ((TextView) child).getLayout();
+            if (layout != null) return (float) Math.ceil(layout.getLineWidth(0));
+        }
+        return child != null ? child.getWidth() : 0;
+    }
+
+    private float inu_currentLabelWidth() {
+        final int count = tabsContainer.getChildCount();
+        if (count == 0) return 0;
+        final float center = indicatorX + indicatorWidth / 2f;
+        View prev = null;
+        for (int i = 0; i < count; i++) {
+            final View child = tabsContainer.getChildAt(i);
+            final float c = child.getLeft() + child.getWidth() / 2f;
+            if (center <= c) {
+                if (prev == null) return inu_labelWidth(child);
+                final float pc = prev.getLeft() + prev.getWidth() / 2f;
+                final float f = c == pc ? 1f : Math.max(0f, Math.min(1f, (center - pc) / (c - pc)));
+                return AndroidUtilities.lerp(inu_labelWidth(prev), inu_labelWidth(child), f);
+            }
+            prev = child;
+        }
+        return inu_labelWidth(tabsContainer.getChildAt(count - 1));
+    }
+
     private int getChildWidth(TextView child) {
         Layout layout = child.getLayout();
+        if (inu_nonIsland && layout != null) {
+            return (int) Math.ceil(layout.getLineWidth(0)) + dp(4);
+        }
 //        if (layout != null) {
 //            return (int) Math.ceil(layout.getLineWidth(0)) + dp(2);
 //        } else {
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/SearchTagsList.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/SearchTagsList.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/SearchTagsList.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/SearchTagsList.java
@@ -933,6 +933,9 @@ public class SearchTagsList extends FrameLayout implements NotificationCenter.No
                 canvas.clipPath(clipPath);
                 blurredDrawable.draw(canvas);
                 strokePaint.setColor((resourcesProvider != null ? resourcesProvider.isDark() : Theme.isCurrentThemeDark()) ? 0x28FFFFFF : 0xFFFFFFFF);
+                if (desu.inugram.helpers.theme.NonIslandHelper.chatElements() && !(resourcesProvider != null ? resourcesProvider.isDark() : Theme.isCurrentThemeDark())) {
+                    strokePaint.setColor(0x1E000000);
+                }
                 canvas.drawPath(clipPath, strokePaint);
                 canvas.restore();
             }
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/SharedMediaLayout.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/SharedMediaLayout.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/SharedMediaLayout.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/SharedMediaLayout.java
@@ -74,6 +74,7 @@ import androidx.recyclerview.widget.GridLayoutManager;
 import androidx.recyclerview.widget.ItemTouchHelper;
 import androidx.recyclerview.widget.LinearLayoutManager;
 import androidx.recyclerview.widget.RecyclerView;
+import desu.inugram.helpers.theme.NonIslandHelper;
 
 import org.telegram.messenger.AndroidUtilities;
 import org.telegram.messenger.AnimationNotificationsLocker;
@@ -433,9 +434,33 @@ public class SharedMediaLayout extends FrameLayout implements NotificationCenter
             for (int i = 0; i < mediaPages.length; i++) {
                 updateFastScrollVisibility(mediaPages[i], true);
             }
+            if (scrollSlidingTextTabStrip != null && scrollSlidingTextTabStrip.inu_pill != null) {
+                scrollSlidingTextTabStrip.inu_pill.setDocked(pinnedToTop);
+            }
+            if (actionModeLayout instanceof desu.inugram.ui.MediaActionModeLayout) {
+                ((desu.inugram.ui.MediaActionModeLayout) actionModeLayout).setDocked(pinnedToTop);
+            }
         }
     }
 
+    public boolean inu_tabsPillMode() {
+        return viewType == VIEW_TYPE_PROFILE_ACTIVITY && NonIslandHelper.sharedMediaTabs();
+    }
+
+    public int inu_dockOffset() {
+        return inu_tabsPillMode() ? dp(7) : 0;
+    }
+
+    private int inu_actionModeHeight() {
+        if (inu_tabsPillMode()) return 50;
+        if (inu_flatTabBar()) return 44;
+        return 48;
+    }
+
+    private boolean inu_flatTabBar() {
+        return NonIslandHelper.sharedMediaTabs() && !inu_tabsPillMode();
+    }
+
     public void drawListForBlur(Canvas blurCanvas, ArrayList<SizeNotifierFrameLayout.IViewWithInvalidateCallback> views) {
         for (int i = 0; i < mediaPages.length; i++) {
             if (mediaPages[i] != null && mediaPages[i].getVisibility() == View.VISIBLE) {
@@ -2199,7 +2224,16 @@ public class SharedMediaLayout extends FrameLayout implements NotificationCenter
         if (profileActivity != null && profileActivity.getFragmentView() instanceof SizeNotifierFrameLayout) {
             sizeNotifierFrameLayout = (SizeNotifierFrameLayout) profileActivity.getFragmentView();
         }
+        if (NonIslandHelper.sharedMediaTabs()) {
+            actionModeLayout = new desu.inugram.ui.MediaActionModeLayout(context, sizeNotifierFrameLayout, inu_tabsPillMode(), resourcesProvider) {
+                @Override
+                public int processColor(int color) {
+                    return SharedMediaLayout.this.processColor(color);
+                }
+            };
+        } else {
         actionModeLayout = new BlurredLinearLayout(context, sizeNotifierFrameLayout);
+        }
 //        actionModeLayout.setBackgroundColor(getThemedColor(Theme.key_windowBackgroundWhite));
         actionModeLayout.setBackgroundColor(getThemedColor(Theme.key_windowBackgroundGray));
         actionModeLayout.setAlpha(0.0f);
@@ -2309,7 +2343,7 @@ public class SharedMediaLayout extends FrameLayout implements NotificationCenter
             savedMessagesContainer.chatActivity.setSavedDialog(dialog_id);
             savedMessagesContainer.chatActivity.reversed = true;
             savedMessagesContainer.setClipToOutline(true);
-            savedMessagesContainer.setOutlineProvider(new ViewOutlineProvider() {
+            savedMessagesContainer.setOutlineProvider(inu_flatTabBar() ? null : new ViewOutlineProvider() {
                 @Override
                 public void getOutline(View view, Outline outline) {
                     outline.setRoundRect(0, 0, view.getWidth(), view.getHeight() + dp(24), dp(24));
@@ -3123,7 +3157,7 @@ public class SharedMediaLayout extends FrameLayout implements NotificationCenter
                     if (view instanceof SharedPhotoVideoCell2) {
                         SharedPhotoVideoCell2 cell = (SharedPhotoVideoCell2) view;
                         final int position = mediaPage.animationSupportingListView.getChildAdapterPosition(cell), spanCount = mediaPage.animationSupportingLayoutManager.getSpanCount();
-                        cell.isTop = position < spanCount;
+                        cell.isTop = position < spanCount && !inu_flatTabBar();
                         cell.isFirst = position % spanCount == 0;
                         cell.isLast = position % spanCount == spanCount - 1;
                         outRect.left = 0;
@@ -3156,7 +3190,7 @@ public class SharedMediaLayout extends FrameLayout implements NotificationCenter
                     } else if (view instanceof SharedPhotoVideoCell2) {
                         SharedPhotoVideoCell2 cell = (SharedPhotoVideoCell2) view;
                         final int position = mediaPage.listView.getChildAdapterPosition(cell), spanCount = mediaPage.layoutManager.getSpanCount();
-                        cell.isTop = position < spanCount;
+                        cell.isTop = position < spanCount && !inu_flatTabBar();
                         cell.isFirst = position % spanCount == 0;
                         cell.isLast = position % spanCount == spanCount - 1;
                         outRect.left = 0;
@@ -3737,6 +3771,10 @@ public class SharedMediaLayout extends FrameLayout implements NotificationCenter
             fragmentContextViewWrapper.addView(fragmentContextView);
             topPanelLayout.setCallFragmentContextView(fragmentContextView);
             addView(topPanelLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP, 0, 48 -14, 0, 0));
+            if (inu_flatTabBar()) {
+                topPanelLayout.inu_blurHelper = desu.inugram.ui.BlurBehindHelper.create(topPanelLayout, sizeNotifierFrameLayout, Theme.key_windowBackgroundWhite);
+                topPanelLayout.setPadding(0, 0, 0, 0);
+            }
 
             fragmentContextView.setDelegate((start, show) -> {
                 if (!start) {
@@ -3758,6 +3796,12 @@ public class SharedMediaLayout extends FrameLayout implements NotificationCenter
             } else {
                 addView(scrollSlidingTextTabStrip, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.LEFT | Gravity.TOP));
             }
+            if (inu_flatTabBar()) {
+                scrollSlidingTextTabStrip.setLayoutParams(LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 44, Gravity.LEFT | Gravity.TOP, 0, 0, 0, 0));
+                scrollSlidingTextTabStrip.inu_makeNonIsland(desu.inugram.ui.BlurBehindHelper.create(scrollSlidingTextTabStrip, sizeNotifierFrameLayout, Theme.key_windowBackgroundWhite));
+            } else if (inu_tabsPillMode()) {
+                desu.inugram.ui.TabsPillDrawer.attach(scrollSlidingTextTabStrip, sizeNotifierFrameLayout);
+            }
             searchTagsList = new SearchTagsList(getContext(), profileActivity, profileActivity.getCurrentAccount(), includeSavedDialogs() ? 0 : dialog_id, resourcesProvider) {
                 @Override
                 protected boolean setFilter(ReactionsLayoutInBubble.VisibleReaction reaction) {
@@ -3802,7 +3846,7 @@ public class SharedMediaLayout extends FrameLayout implements NotificationCenter
             };
             searchTagsList.setShown(0f);
             addView(searchTagsList, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 38, Gravity.LEFT | Gravity.TOP, 0, 4, 0, 0));
-            addView(actionModeLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.LEFT | Gravity.TOP));
+            addView(actionModeLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, inu_actionModeHeight(), Gravity.LEFT | Gravity.TOP));
         }
 
         updateTabs(false);
@@ -5700,6 +5744,7 @@ public class SharedMediaLayout extends FrameLayout implements NotificationCenter
         if (heightSize == 0) {
             heightSize = MeasureSpec.getSize(heightMeasureSpec);
         }
+        heightSize += inu_dockOffset();
 
         setMeasuredDimension(widthSize, heightSize);
 
@@ -7409,7 +7454,7 @@ public class SharedMediaLayout extends FrameLayout implements NotificationCenter
                         Theme.isCurrentThemeDark()
                     )
                 );
-                mediaPages[a].setOutlineProvider(new ViewOutlineProvider() {
+                mediaPages[a].setOutlineProvider(inu_flatTabBar() ? null : new ViewOutlineProvider() {
                     @Override
                     public void getOutline(View view, Outline outline) {
                         outline.setRoundRect(0, dp(50), view.getWidth(), view.getHeight() + dp(24), dp(24));
@@ -11570,6 +11615,7 @@ public class SharedMediaLayout extends FrameLayout implements NotificationCenter
 
         @Override
         protected void dispatchDraw(@NonNull Canvas canvas) {
+            if (inu_nonIsland || inu_pill != null) { super.dispatchDraw(canvas); return; }
             if (backgroundColor != Color.TRANSPARENT) {
                 if (backgroundPaint == null) {
                     backgroundPaint = new Paint();
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/TopicsTabsView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/TopicsTabsView.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/TopicsTabsView.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/TopicsTabsView.java
@@ -71,6 +71,7 @@ import org.telegram.ui.TopicCreateFragment;
 import java.util.ArrayList;
 import java.util.HashSet;
 
+import desu.inugram.helpers.theme.NonIslandHelper;
 import me.vkryl.android.animator.BoolAnimator;
 import me.vkryl.android.animator.FactorAnimator;
 import me.vkryl.core.BitwiseUtils;
@@ -79,8 +80,8 @@ import me.vkryl.core.BitwiseUtils;
 public class TopicsTabsView extends FrameLayout implements NotificationCenter.NotificationCenterDelegate, FactorAnimator.Target {
     public static final int ANIMATOR_ID_TOPICS_VISIBILITY = 0;
 
-    public static final int TOP_TABS_HEIGHT = 36;
-    public static final int SIDE_TABS_WIDTH = 64;
+    public static int TOP_TABS_HEIGHT = 36;
+    public static int SIDE_TABS_WIDTH = 64;
 
     private final BoolAnimator animatorTopicsVisibility = new BoolAnimator(ANIMATOR_ID_TOPICS_VISIBILITY,
         this, CubicBezierInterpolator.EASE_OUT_QUINT, 380L, true);
@@ -123,11 +124,12 @@ public class TopicsTabsView extends FrameLayout implements NotificationCenter.No
         setClipToPadding(true);
         setWillNotDraw(false);
 
+        final int m = NonIslandHelper.chatElements() ? 0 : 7;
         topTabsContainer = new FrameLayout(context);
-        addView(topTabsContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, TOP_TABS_HEIGHT, Gravity.TOP | Gravity.FILL_HORIZONTAL, 7, 7, 7, 7));
+        addView(topTabsContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, TOP_TABS_HEIGHT, Gravity.TOP | Gravity.FILL_HORIZONTAL, m, m, m, m));
 
         sideTabsContainer = new FrameLayout(context);
-        addView(sideTabsContainer, LayoutHelper.createFrame(64, LayoutHelper.MATCH_PARENT, Gravity.LEFT | Gravity.FILL_VERTICAL, 7, 7, 7, 7));
+        addView(sideTabsContainer, LayoutHelper.createFrame(64, LayoutHelper.MATCH_PARENT, Gravity.LEFT | Gravity.FILL_VERTICAL, m, m, m, m));
 
         topTabs = new UniversalRecyclerView(context, currentAccount, 0, this::fillHorizontalTabs, this::onTabClick, this::onTabLongClick, resourcesProvider) {
             private final GradientClip clip = new GradientClip();
@@ -140,7 +142,7 @@ public class TopicsTabsView extends FrameLayout implements NotificationCenter.No
             protected void dispatchDraw(Canvas canvas) {
                 final float clipAlphaL = animatedClipL.set(canScrollHorizontally(-1));
                 final float clipAlphaR = animatedClipR.set(canScrollHorizontally(1));
-                final boolean needClip = clipAlphaL > 0 || clipAlphaR > 0;
+                final boolean needClip = (clipAlphaL > 0 || clipAlphaR > 0) && !NonIslandHelper.chatElements();
                 if (needClip) {
                     canvas.saveLayerAlpha(0, 0, getWidth(), getHeight(), 0xFF, Canvas.ALL_SAVE_FLAG);
                 }
@@ -440,7 +442,7 @@ public class TopicsTabsView extends FrameLayout implements NotificationCenter.No
             sideMenuBackgroundDrawable.setBounds(
                     (int) (sideTabsContainer.getTranslationX()),
                     (int) sideMenuBackgroundMarginTop,
-                    (int) (sideTabsContainer.getTranslationX() + dp(7 + 7 + 64)),
+                    (int) (sideTabsContainer.getTranslationX() + dp(NonIslandHelper.chatElements() ? SIDE_TABS_WIDTH : (7 + 7 + 64))),
                     (int) (getMeasuredHeight() - sideMenuBackgroundMarginBottom));
             sideMenuBackgroundDrawable.draw(canvas);
         }
@@ -448,7 +450,7 @@ public class TopicsTabsView extends FrameLayout implements NotificationCenter.No
             topMenuBackgroundDrawable.setAlpha((int) (255 * topTabsContainer.getAlpha()));
             topMenuBackgroundDrawable.setBounds(
                     0, (int) topTabsContainer.getTranslationY(),
-                    getMeasuredWidth(), (int) (topTabsContainer.getTranslationY() + dp(TOP_TABS_HEIGHT + 7 + 7)));
+                    getMeasuredWidth(), (int) (topTabsContainer.getTranslationY() + dp(NonIslandHelper.chatElements() ? TOP_TABS_HEIGHT : (TOP_TABS_HEIGHT + 7 + 7))));
             topMenuBackgroundDrawable.draw(canvas);
         }
 
@@ -480,14 +482,14 @@ public class TopicsTabsView extends FrameLayout implements NotificationCenter.No
 
     public void setSideMenuBackgroundDrawable(BlurredBackgroundDrawable sideMenuBackgroundDrawable) {
         this.sideMenuBackgroundDrawable = sideMenuBackgroundDrawable;
-        this.sideMenuBackgroundDrawable.setRadius(dp(16));
-        this.sideMenuBackgroundDrawable.setPadding(dp(7));
+        this.sideMenuBackgroundDrawable.setRadius(NonIslandHelper.chatElements() ? 0 : dp(16));
+        this.sideMenuBackgroundDrawable.setPadding(NonIslandHelper.chatElements() ? 0 : dp(7));
     }
 
     public void setTopMenuBackgroundDrawable(BlurredBackgroundDrawable sideMenuBackgroundDrawable) {
         this.topMenuBackgroundDrawable = sideMenuBackgroundDrawable;
-        this.topMenuBackgroundDrawable.setRadius(dp(18));
-        this.topMenuBackgroundDrawable.setPadding(dp(7));
+        this.topMenuBackgroundDrawable.setRadius(NonIslandHelper.chatElements() ? 0 : dp(18));
+        this.topMenuBackgroundDrawable.setPadding(NonIslandHelper.chatElements() ? 0 : dp(7));
     }
 
 
@@ -578,9 +580,9 @@ public class TopicsTabsView extends FrameLayout implements NotificationCenter.No
         topTabsContainer.setAlpha(lerp(1.0f, 0f, sidemenuT));
         topTabsContainer.setVisibility(((1f - sidemenuT) * animatorTopicsVisibility.getFloatValue()) > 0 ? View.VISIBLE : View.GONE);
         if (topicBottom) {
-            topTabsContainer.setTranslationY(getMeasuredHeight() - dp(TOP_TABS_HEIGHT + 7 + 7) - sideMenuBackgroundMarginBottom + lerp(dp(TOP_TABS_HEIGHT + 7), 0, getTabsVisibility(Position.BOTTOM)));
+            topTabsContainer.setTranslationY(getMeasuredHeight() - dp(TOP_TABS_HEIGHT + (NonIslandHelper.chatElements() ? 0 : (7 + 7))) - sideMenuBackgroundMarginBottom + lerp(dp(TOP_TABS_HEIGHT + (NonIslandHelper.chatElements() ? 0 : 7)), 0, getTabsVisibility(Position.BOTTOM)));
         } else {
-            topTabsContainer.setTranslationY(sideMenuBackgroundMarginTop + lerp(-dp(TOP_TABS_HEIGHT + 7), 0, getTabsVisibility(Position.TOP)));
+            topTabsContainer.setTranslationY(sideMenuBackgroundMarginTop + lerp(-dp(TOP_TABS_HEIGHT + (NonIslandHelper.chatElements() ? 0 : 7)), 0, getTabsVisibility(Position.TOP)));
         }
     }
 
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/TranslateButton.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/TranslateButton.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/TranslateButton.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/TranslateButton.java
@@ -128,7 +128,9 @@ public class TranslateButton extends FrameLayout implements Theme.Colorable {
     @Override
     public void updateColors() {
         textView.setTextColor(Theme.getColor(Theme.key_chat_addContact, resourcesProvider));
-        textView.setBackground(Theme.createInsetRoundRectDrawable(Theme.getColor(Theme.key_chat_addContact, resourcesProvider) & 0x19ffffff, dp(15), dp(3)));
+        textView.setBackground(desu.inugram.helpers.theme.NonIslandHelper.chatElements()
+            ? Theme.createSelectorDrawable(Theme.getColor(Theme.key_chat_addContact, resourcesProvider) & 0x19ffffff, Theme.RIPPLE_MASK_ALL)
+            : Theme.createInsetRoundRectDrawable(Theme.getColor(Theme.key_chat_addContact, resourcesProvider) & 0x19ffffff, dp(15), dp(3)));
         menuView.setBackground(Theme.createCircleSelectorDrawable(Theme.getColor(Theme.key_listSelector, resourcesProvider), 0, 0));
         menuView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_topPanelClose, resourcesProvider), PorterDuff.Mode.MULTIPLY));
         translateDrawable.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_addContact, resourcesProvider), PorterDuff.Mode.MULTIPLY));
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ViewPagerFixed.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ViewPagerFixed.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ViewPagerFixed.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ViewPagerFixed.java
@@ -1591,6 +1591,13 @@ public class ViewPagerFixed extends FrameLayout {
         ValueAnimator tabsAnimator;
         private float animationValue;
 
+        public boolean inu_md3Tabs;
+
+        public void inu_applyMd3Style() {
+            inu_md3Tabs = true;
+            desu.inugram.helpers.theme.NonIslandHelper.applyMd3TabsStyle(selectorDrawable, listView, Theme.getColor(selectorColorKey, resourcesProvider));
+        }
+
         public TabsView(Context context, boolean hasStableIds, int tabsSelectorType, Theme.ResourcesProvider resourcesProvider) {
             super(context);
             this.resourcesProvider = resourcesProvider;
@@ -2041,7 +2048,10 @@ public class ViewPagerFixed extends FrameLayout {
                             indicatorX = (int) AndroidUtilities.lerp(lastDrawnIndicatorX, indicatorX, indicatorProgress2);
                             indicatorWidth = (int) AndroidUtilities.lerp(lastDrawnIndicatorW, indicatorWidth, indicatorProgress2);
                         }
-                        if (selectorType == SELECTOR_TYPE_BUBBLE_STYLE) {
+                        if (inu_md3Tabs) {
+                            desu.inugram.helpers.theme.NonIslandHelper.setMd3TabIndicatorBounds(selectorDrawable, indicatorX, indicatorWidth, height, hideProgress);
+                            selectorDrawable.draw(canvas);
+                        } else if (selectorType == SELECTOR_TYPE_BUBBLE_STYLE) {
                             final float TAB_INTERNAL_PADDING = 12.5f;
                             final float add = additionalTabWidth / 2f;
                             final int y = height / 2 - dp(14);
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/blur3/drawable/BlurredBackgroundDrawable.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/blur3/drawable/BlurredBackgroundDrawable.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/blur3/drawable/BlurredBackgroundDrawable.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/blur3/drawable/BlurredBackgroundDrawable.java
@@ -395,6 +395,7 @@ public abstract class BlurredBackgroundDrawable extends Drawable {
         float[] radii, float strokeWidth, boolean isTop,
         Paint paint
     ) {
+        if (desu.inugram.InuConfig.DISABLE_GLASS_GLARE.getValue()) return;
 
         final boolean radiiAreSame = isTop ?
             radii[0] == radii[1] && radii[1] == radii[2] && radii[2] == radii[3]:
@@ -496,6 +497,7 @@ public abstract class BlurredBackgroundDrawable extends Drawable {
 
     public static void drawStroke(Canvas canvas, float left, float top, float right, float bottom,
                                      float radii, float strokeWidth, boolean isTop, Paint paint) {
+        if (desu.inugram.InuConfig.DISABLE_GLASS_GLARE.getValue()) return;
         final float strokeHalf = strokeWidth / 2f;
         canvas.save();
         if (isTop) {
@@ -649,7 +651,7 @@ public abstract class BlurredBackgroundDrawable extends Drawable {
             return;
         }
 
-        final NinePatchDrawable ninePatchDrawable = checkNinePatchDrawable(fillColor, true);
+        final NinePatchDrawable ninePatchDrawable = checkNinePatchDrawable(fillColor, !desu.inugram.InuConfig.DISABLE_GLASS_GLARE.getValue());
         ninePatchDrawable.setBounds(
             boundProps.boundsWithPadding.left - ninePatchDrawablePadding.left,
             boundProps.boundsWithPadding.top - ninePatchDrawablePadding.top,
@@ -704,6 +706,7 @@ public abstract class BlurredBackgroundDrawable extends Drawable {
     }
 
     private void drawStrokeInternalIfNeeded(Canvas canvas) {
+        if (desu.inugram.InuConfig.DISABLE_GLASS_GLARE.getValue()) return;
         final int strokeColorTop = Theme.multAlpha(this.strokeColorTop, alpha / 255f);
         final int strokeColorBottom = Theme.multAlpha(this.strokeColorBottom, alpha / 255f);
 
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/blur3/drawable/color/impl/BlurredBackgroundProviderImpl.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/blur3/drawable/color/impl/BlurredBackgroundProviderImpl.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/blur3/drawable/color/impl/BlurredBackgroundProviderImpl.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/blur3/drawable/color/impl/BlurredBackgroundProviderImpl.java
@@ -12,6 +12,7 @@ import org.telegram.messenger.MessagesController;
 import org.telegram.messenger.SharedConfig;
 import org.telegram.messenger.UserConfig;
 import org.telegram.ui.ActionBar.Theme;
+import desu.inugram.helpers.theme.NonIslandHelper;
 import org.telegram.ui.Components.blur3.drawable.color.BlurredBackgroundProvider;
 import org.telegram.ui.Components.blur3.drawable.color.BlurredBackgroundProviderBuilder;
 
@@ -135,7 +136,7 @@ public class BlurredBackgroundProviderImpl {
     }
 
     public static BlurredBackgroundProvider topPanelChatActivity(Theme.ResourcesProvider resourcesProvider) {
-        return new BlurredBackgroundProviderBuilder(resourcesProvider)
+        BlurredBackgroundProviderBuilder b = new BlurredBackgroundProviderBuilder(resourcesProvider)
                 .setBackgroundColor((r, isDark) -> {
                     if (!checkBlurEnabled(resourcesProvider)) {
                         return ColorUtils.setAlphaComponent(Theme.getColor(isDark ?
@@ -145,13 +146,15 @@ public class BlurredBackgroundProviderImpl {
                     final float alpha = LiteMode.isEnabled(LiteMode.FLAG_LIQUID_GLASS) ? 0.85f : 0.76f;
                     final int colorBg = Theme.getColor(Theme.key_chat_topPanelBackground, r);
                     return Theme.multAlpha(colorBg, alpha);
-                })
-                .setStrokeColorTop(0xFFFFFFFF, 0x20FFFFFF)
+                });
+        if (!NonIslandHelper.chatElements()) {
+            b.setStrokeColorTop(0xFFFFFFFF, 0x20FFFFFF)
                 .setStrokeColorBottom(0xFFFFFFFF, 0x14FFFFFF)
                 .setShadowColor(0x20000000, 0)
                 //.setShadowLayer(dpf2(10 / 3f), 0, dpf2(2 / 3f))
-                .setStrokeWidth(dpf2(0.55f), dpf2(0.55f))
-                .build();
+                .setStrokeWidth(dpf2(0.55f), dpf2(0.55f));
+        }
+        return b.build();
     }
 
     public static BlurredBackgroundProvider attachMenuActionBar(Theme.ResourcesProvider resourcesProvider) {
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/chat/ChatInputViewsContainer.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/chat/ChatInputViewsContainer.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/chat/ChatInputViewsContainer.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/chat/ChatInputViewsContainer.java
@@ -79,6 +79,10 @@ public class ChatInputViewsContainer extends FrameLayout {
     private BlurredBackgroundDrawable underKeyboardBackgroundDrawable;
     public void setInputIslandBubbleDrawable(BlurredBackgroundDrawable drawable) {
         blurredBackgroundDrawable = drawable;
+        if (desu.inugram.helpers.theme.NonIslandHelper.chatElements()) {
+            blurredBackgroundDrawable.setStrokeWidth(0, 0);
+            return;
+        };
         blurredBackgroundDrawable.setPadding(dp(7));
         blurredBackgroundDrawable.setRadius(dp(INPUT_BUBBLE_RADIUS));
     }
@@ -86,7 +90,8 @@ public class ChatInputViewsContainer extends FrameLayout {
     public void setUnderKeyboardBackgroundDrawable(BlurredBackgroundDrawable drawable) {
         underKeyboardBackgroundDrawable = drawable;
         underKeyboardBackgroundDrawable.enableInAppKeyboardOptimization();
-        underKeyboardBackgroundDrawable.setRadius(dp(INPUT_KEYBOARD_RADIUS), dp(INPUT_KEYBOARD_RADIUS), 0, 0);
+        final int topRadius = desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? 0 : dp(INPUT_KEYBOARD_RADIUS);
+        underKeyboardBackgroundDrawable.setRadius(topRadius, topRadius, 0, 0);
         underKeyboardBackgroundDrawable.setThickness(dp(32));
         underKeyboardBackgroundDrawable.setIntensity(0.4f);
     }
@@ -178,7 +183,8 @@ public class ChatInputViewsContainer extends FrameLayout {
                     rightBottomRadius = bottomRight == null ? 0 : bottomRight.getRadius();
                 }
             }
-            underKeyboardBackgroundDrawable.setRadius(dp(INPUT_KEYBOARD_RADIUS), dp(INPUT_KEYBOARD_RADIUS), rightBottomRadius, leftBottomRadius, true);
+            final int topRadius = desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? 0 : dp(INPUT_KEYBOARD_RADIUS);
+            underKeyboardBackgroundDrawable.setRadius(topRadius, topRadius, rightBottomRadius, leftBottomRadius, true);
         }
     }
 
@@ -268,12 +274,24 @@ public class ChatInputViewsContainer extends FrameLayout {
         );
         tmpRect.inset(0, -dp(7));
         tmpRect.offset(0, blurTop + (int) bubbleInputTranlationY);
+        if (desu.inugram.helpers.theme.NonIslandHelper.chatElements()) {
+            tmpRect.top += dp(16);
+            tmpRect.bottom = getMeasuredHeight();
+            tmpRect.left = 0;
+            tmpRect.right = getMeasuredWidth();
+        }
 
-        blurredBackgroundDrawable.setBounds(tmpRect);
-        if (drawInputBackground)
-            blurredBackgroundDrawable.draw(canvas);
+        if (!nonIsland || hasBar) {
+            blurredBackgroundDrawable.setBounds(tmpRect);
+            if (drawInputBackground)
+                blurredBackgroundDrawable.draw(canvas);
+        }
 
-        if (needDrawInAppKeyboard) {
+        // in non-island mode the bubble bg also covers the under-keyboard area, but
+        // only when fully opaque — when the bar fades out (e.g. selection mode + open
+        // stickers panel) we need the under-keyboard bg as fallback.
+        final boolean bubbleCoversKeyboard = nonIsland && hasBar && blurredBackgroundDrawable.getAlpha() == 255;
+        if (needDrawInAppKeyboard && !bubbleCoversKeyboard) {
             underKeyboardBackgroundDrawable.draw(canvas);
         }
 
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/chat/buttons/ChatActivityBlurredRoundButton.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/chat/buttons/ChatActivityBlurredRoundButton.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/chat/buttons/ChatActivityBlurredRoundButton.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/chat/buttons/ChatActivityBlurredRoundButton.java
@@ -52,12 +52,12 @@ public class ChatActivityBlurredRoundButton extends FrameLayout implements Facto
     @Override
     protected void onSizeChanged(int w, int h, int oldw, int oldh) {
         super.onSizeChanged(w, h, oldw, oldh);
-        backgroundDrawable.setBounds(0, 0, w, h);
+        if (backgroundDrawable != null) backgroundDrawable.setBounds(0, 0, w, h);
     }
 
     @Override
     public void draw(@NonNull Canvas canvas) {
-        backgroundDrawable.draw(canvas);
+        if (backgroundDrawable != null) backgroundDrawable.draw(canvas);
         super.draw(canvas);
     }
 
@@ -121,8 +121,10 @@ public class ChatActivityBlurredRoundButton extends FrameLayout implements Facto
     private BlurredBackgroundDrawable backgroundDrawable;
     public void setBlurredBackgroundDrawable(BlurredBackgroundDrawable drawable) {
         backgroundDrawable = drawable;
+        if (backgroundDrawable != null) {
         backgroundDrawable.setPadding(dp(CLICK_ZONE_MARGIN));
         backgroundDrawable.setRadius(dp(BUTTON_SIZE / 2f));
+        }
     }
 
     public void showLoading(boolean loading, boolean animated) {
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/chat/layouts/ChatActivityChannelButtonsLayout.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/chat/layouts/ChatActivityChannelButtonsLayout.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/chat/layouts/ChatActivityChannelButtonsLayout.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/chat/layouts/ChatActivityChannelButtonsLayout.java
@@ -30,6 +30,7 @@ import org.telegram.ui.Components.chat.buttons.ChatActivityBlurredRoundButton;
 
 import java.util.HashSet;
 
+import desu.inugram.helpers.theme.NonIslandHelper;
 import me.vkryl.android.animator.BoolAnimator;
 import me.vkryl.android.animator.FactorAnimator;
 
@@ -136,13 +137,16 @@ public class ChatActivityChannelButtonsLayout extends FrameLayout implements Fac
             }
 
             ScaleStateListAnimator.apply(button, .13f, 2f);
+            if (NonIslandHelper.chatElements()) {
+                button.setBlurredBackgroundDrawable(null);
+            }
             button.setVisibility(GONE);
             button.setOnClickListener(v -> {
                 if (onClickListeners[buttonId] != null) {
                     onClickListeners[buttonId].onClick(v);
                 }
             });
-            addView(button, LayoutHelper.createFrame(56, 56));
+            addView(button, LayoutHelper.createFrame(56, 56, Gravity.CENTER_VERTICAL | Gravity.LEFT));
 
             buttonHolders[buttonId] = new ButtonHolder(button, visibilityAnimator);
             checkButtonsPositionsAndVisibility();
@@ -153,10 +157,15 @@ public class ChatActivityChannelButtonsLayout extends FrameLayout implements Fac
 
     private BlurredBackgroundDrawable containerDrawable;
     public void setupDrawableForContainer() {
+        final boolean flat = NonIslandHelper.chatElements();
+        if (flat) {
+            // flat full-width bar: no rounded clip so the ripple/background fills edge-to-edge
+            container.setOutlineProvider(ViewOutlineProviderImpl.boundsWithPaddingRoundRect(0, 0));
+        }
         containerDrawable = blurredBackgroundDrawableViewFactory.create(this)
             .setColorProvider(colorProvider)
-            .setRadius(dp(22))
-            .setPadding(dp(6));
+            .setRadius(dp(flat ? 0 : 22))
+            .setPadding(dp(flat ? 0 : 6));
     }
 
     public boolean isButtonVisible(final int buttonId) {
@@ -280,6 +289,11 @@ public class ChatActivityChannelButtonsLayout extends FrameLayout implements Fac
             paddingRight += holder.visibilityAnimator.getValue() ? dp(44 + 10) : 0;
         }
 
+        if (NonIslandHelper.chatElements() && containerDrawable != null) {
+            // flat full-width bar (admin log): container fills the bar so it isn't click-through
+            paddingLeft = paddingRight = 0;
+        }
+
         final MarginLayoutParams lp = (MarginLayoutParams) container.getLayoutParams();
 
         if (lp.leftMargin != paddingLeft || lp.rightMargin != paddingRight) {
@@ -414,10 +428,15 @@ public class ChatActivityChannelButtonsLayout extends FrameLayout implements Fac
     @Override
     protected boolean drawChild(@NonNull Canvas canvas, View child, long drawingTime) {
         if (child == container && containerDrawable != null) {
-            tmpRect.set(
-                totalWidthLeft + dp(1), 0,
-                getMeasuredWidth() - dp(1) - totalWidthRight,
-                getMeasuredHeight());
+            if (NonIslandHelper.chatElements()) {
+                // flat full-width bar, spanning bottom padding (nav bar inset) too
+                tmpRect.set(0, 0, getMeasuredWidth(), getMeasuredHeight());
+            } else {
+                tmpRect.set(
+                    totalWidthLeft + dp(1), 0,
+                    getMeasuredWidth() - dp(1) - totalWidthRight,
+                    getMeasuredHeight());
+            }
 
             tmpRect.round(AndroidUtilities.rectTmp2);
             containerDrawable.setBounds(AndroidUtilities.rectTmp2);
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/glass/GlassTabView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/glass/GlassTabView.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/glass/GlassTabView.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/glass/GlassTabView.java
@@ -71,6 +71,7 @@ public class GlassTabView extends FrameLayout implements MainTabsLayout.Tab, Fac
     private int colorSelectedText;
     private int colorDefault;
     private boolean usePremiumCounter;
+    public float inu_radiusOverride = -1;
 
     private TabAnimation tabAnimation;
     private TLRPC.TL_attachMenuBot tabAnimationBot;
@@ -156,7 +157,7 @@ public class GlassTabView extends FrameLayout implements MainTabsLayout.Tab, Fac
 
             paintCounterBackground.setColor(Theme.multAlpha(colorSelected, 0.09f * alpha));
             tmpRectF.set(0, 0, viewWidth, getHeight());
-            final float r = Math.min(tmpRectF.width(), tmpRectF.height()) / 2f;
+            final float r = inu_radiusOverride >= 0 ? inu_radiusOverride : Math.min(tmpRectF.width(), tmpRectF.height()) / 2f;
             final float s = lerp(0.6f, 1, selectedFactor) * MathUtils.clamp(attachScale, 0, 1);
             canvas.save();
             canvas.scale(s, s, tmpRectF.centerX(), tmpRectF.centerY());
@@ -450,6 +451,7 @@ public class GlassTabView extends FrameLayout implements MainTabsLayout.Tab, Fac
         tab.colorSelected = Theme.getColor(Theme.key_glass_tabSelected, resourcesProvider);
         tab.colorSelectedText = Theme.getColor(Theme.key_glass_tabSelectedText, resourcesProvider);
         tab.updateColors();
+        if (desu.inugram.helpers.theme.NonIslandHelper.chatElements()) tab.inu_radiusOverride = dp(16);
         return tab;
     }
 
@@ -467,6 +469,7 @@ public class GlassTabView extends FrameLayout implements MainTabsLayout.Tab, Fac
         tab.colorSelected = Theme.getColor(Theme.key_glass_tabSelected, resourcesProvider);
         tab.colorSelectedText = Theme.getColor(Theme.key_glass_tabSelectedText, resourcesProvider);
         tab.updateColors();
+        if (desu.inugram.helpers.theme.NonIslandHelper.chatElements()) tab.inu_radiusOverride = dp(16);
         return tab;
     }
 
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java
@@ -282,6 +282,7 @@ import desu.inugram.InuHooks;
 import desu.inugram.helpers.dialogs.DialogsFabHelper;
 import desu.inugram.helpers.dialogs.FolderHelper;
 import desu.inugram.helpers.dialogs.MainTabsHelper;
+import desu.inugram.helpers.theme.NonIslandHelper;
 import me.vkryl.android.animator.BoolAnimator;
 import me.vkryl.android.animator.FactorAnimator;
 import me.vkryl.android.util.ClickHelper;
@@ -871,7 +872,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
                 h += storiesHeight * (1f - searchAnimationProgress) * (1f - rightSlidingProgress) * (1f - progressToActionMode);
             }
             h += storiesOverscroll;
-            h += dp(SEARCH_FIELD_HEIGHT) * (1f - progressToActionMode) * (1f - searchAnimationProgress) * (1f - rightSlidingProgress);
+            h += NonIslandHelper.globalSearch() ? 0 : (dp(SEARCH_FIELD_HEIGHT) * (1f - progressToActionMode) * (1f - searchAnimationProgress) * (1f - rightSlidingProgress));
 
             return (int) h;
         }
@@ -1017,7 +1018,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
                 if (searchAnimationProgress == 1f) {
                     actionBarSearchPaint.setColor(getThemedColor(Theme.key_windowBackgroundWhite));
                 } else if (searchAnimationProgress == 0) {
-                    if (fragmentSearchField != null) {
+                    if (fragmentSearchField != null && !NonIslandHelper.globalSearch()) {
                         fragmentSearchField.setTranslationY(scrollYOffset + getSearchFieldAdditionOffset());
                     }
                 }
@@ -1032,7 +1033,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
                         blurBounds.set(0, top, getMeasuredWidth(), top + actionBarHeight - dp(2 * searchAnimationProgress));
                         drawBlurRect(canvas, 0, blurBounds, actionBarSearchPaint, true);
                     }
-                    if (fragmentSearchField != null) {
+                    if (fragmentSearchField != null && !NonIslandHelper.globalSearch()) {
                         fragmentSearchField.setTranslationY(top + actionBarHeight - (actionBar.getHeight() + (filterTabsView != null ? filterTabsView.getMeasuredHeight() : 0)) + getSearchFieldAdditionOffset());
                     }
                 }
@@ -1048,9 +1049,10 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
             }
             tabsYOffset = 0;
             storiesYOffset = 0;
+            final int inu_searchFieldH = NonIslandHelper.globalSearch() ? 0 : dp(SEARCH_FIELD_HEIGHT);
             tabsYOffset -= Math.min(
-                dp(hasStories ? DialogStoriesCell.HEIGHT_IN_DP : 0) + dp(SEARCH_FIELD_HEIGHT) + scrollYOffset,
-                progressToActionMode * (dp(hasStories ? DialogStoriesCell.HEIGHT_IN_DP : 0) + dp(SEARCH_FIELD_HEIGHT))
+                dp(hasStories ? DialogStoriesCell.HEIGHT_IN_DP : 0) + inu_searchFieldH + scrollYOffset,
+                progressToActionMode * (dp(hasStories ? DialogStoriesCell.HEIGHT_IN_DP : 0) + inu_searchFieldH)
             );
             storiesYOffset = tabsYOffset;
             if ((rightSlidingDialogContainer != null && rightSlidingDialogContainer.hasFragment())) {
@@ -1064,7 +1066,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
                 if (filterTabsView != null && filterTabsView.getVisibility() == View.VISIBLE) {
                     tabsYOffset -= (1f - animatorFilterTabsVisible.getFloatValue()) * filterTabsView.getMeasuredHeight();
                 }
-                if (fragmentSearchField != null) {
+                if (fragmentSearchField != null && !NonIslandHelper.globalSearch()) {
                     fragmentSearchField.setTranslationY(lerp(scrollYOffset + tabsYOffset, -dp(hasStories ? DialogStoriesCell.HEIGHT_IN_DP : 0), rightSlidingProgress) + getSearchFieldAdditionOffset());
                 }
                 float rightFragmentOffset = 0;
@@ -1076,23 +1078,33 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
                 if (hasStories) {
                     addH += dp(DialogStoriesCell.HEIGHT_IN_DP);
                 }
-                addH += dp(SEARCH_FIELD_HEIGHT);
+                addH += inu_searchFieldH;
                 addH *= rightSlidingDialogContainer.openedProgress;
 
                 viewPages[0].setTranslationY(rightFragmentOffset - addH);
             } else {
-                if (fragmentSearchField != null) {
+                if (fragmentSearchField != null && !NonIslandHelper.globalSearch()) {
                     fragmentSearchField.setTranslationY(lerp(
                         scrollYOffset + tabsYOffset + storiesOverscroll - dp(4),
                         -dp(SEARCH_FIELD_HEIGHT + (hasStories ? DialogStoriesCell.HEIGHT_IN_DP : 0)),
                         searchAnimationProgress
                     ));
                 }
+                if (fragmentSearchField != null && NonIslandHelper.globalSearch()) {
+                    fragmentSearchField.setTranslationY(
+                        -dp(SEARCH_FIELD_HEIGHT + 4) - (AndroidUtilities.statusBarHeight + dp(8))
+                        + scrollYOffset + tabsYOffset + storiesOverscroll
+                        - (hasStories ? Math.max(0, dp(DialogStoriesCell.HEIGHT_IN_DP) + scrollYOffset) : 0)
+                    );
+                }
             }
             updateContextViewPosition();
             updateStoriesViewAlpha(storiesAlpha);
             super.dispatchDraw(canvas);
-            drawHeaderShadow(canvas, top + actionBarHeight);
+            if (!NonIslandHelper.foldersBar() || filterTabsView == null || filterTabsView.getVisibility() != View.VISIBLE) {
+                drawHeaderShadow(canvas, top + actionBarHeight
+                    + (NonIslandHelper.foldersBar() && topPanelLayout != null ? (int) topPanelLayout.getAnimatedHeightWithPadding(0) : 0));
+            }
 
             /*if (fragmentContextView != null && fragmentContextView.isCallStyle()) {
                 canvas.save();
@@ -1175,7 +1187,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
                         if (hasStories) {
                             h += dp(DialogStoriesCell.HEIGHT_IN_DP);
                         }
-                        h += dp(SEARCH_FIELD_HEIGHT);
+                        h += NonIslandHelper.globalSearch() ? 0 : dp(SEARCH_FIELD_HEIGHT);
                     }
                     h += actionModeAdditionalHeight;
                     if (actionBarColorAnimator == null) {
@@ -1314,7 +1326,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
                     childTop = 0;
                 } else if (child == topPanelLayout || child == topBubblesFadeView || child == filterTabsView) {
                     childTop += actionBar.getMeasuredHeight();
-                    childTop += dp(SEARCH_FIELD_HEIGHT);
+                    childTop += NonIslandHelper.globalSearch() ? 0 : dp(SEARCH_FIELD_HEIGHT);
                 } else if (dialogStoriesCell != null && dialogStoriesCell.getPremiumHint() == child) {
                     continue;
                 }
@@ -1665,11 +1677,12 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
 
             actionBar.setTranslationY(0);
         }
+        final float inu_preSearchAlpha = containersAlpha;
         containersAlpha *= (1f - factorSearch);
         if (containersAlpha != 1f) {
             actionBar.getTitlesContainer().setPivotY(AndroidUtilities.statusBarHeight);
             actionBar.getTitlesContainer().setPivotX(dp(20));
-            float s = 0.4f + 0.6f * containersAlpha;
+            float s = 0.4f + 0.6f * (NonIslandHelper.globalSearch() ? inu_preSearchAlpha : containersAlpha);
             actionBar.getTitlesContainer().setScaleY(s);
             actionBar.getTitlesContainer().setScaleX(s);
 
@@ -2068,7 +2081,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
             if (hasStories && !actionModeFullyShowed) {
                 t += dp(DialogStoriesCell.HEIGHT_IN_DP);
             }
-            if (!actionModeFullyShowed) {
+            if (!actionModeFullyShowed && !NonIslandHelper.globalSearch()) {
                 t += dp(SEARCH_FIELD_HEIGHT);
             }
             additionalPadding = 0;
@@ -2076,17 +2089,19 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
             final float filterTabsVisibility = getFilterTabsVisibilityFactor(false);
             final float topPanelsVisibility = topPanelLayout != null ? topPanelLayout.getMetadata().getTotalVisibility() : 0f;
 
-            t += (int) (dp(36 + 14) * filterTabsVisibility);
-            additionalPadding += (int) (dp(36 + 14) * filterTabsVisibility);
+            t += (int) (dp(NonIslandHelper.foldersBar() ? NonIslandHelper.FOLDERS_BAR_VISIBLE_HEIGHT_DP : 36 + 14) * filterTabsVisibility);
+            additionalPadding += (int) (dp(NonIslandHelper.foldersBar() ? NonIslandHelper.FOLDERS_BAR_VISIBLE_HEIGHT_DP : 36 + 14) * filterTabsVisibility);
 
             if (topPanelLayout != null) {
-                final int h = (int) topPanelLayout.getAnimatedHeightWithPadding(lerp((float) dp(14), dp(7), filterTabsVisibility));
+                final int h = (int) topPanelLayout.getAnimatedHeightWithPadding(NonIslandHelper.foldersBar() ? 0f : lerp((float) dp(14), dp(7), filterTabsVisibility));
                 t += h;
                 additionalPadding += h;
             }
 
+            if (!NonIslandHelper.foldersBar()) {
             t -= dp(5 * Math.max(filterTabsVisibility, topPanelsVisibility));
             additionalPadding -= dp(5 * Math.max(filterTabsVisibility, topPanelsVisibility));
+            }
 
             final int b = calculateListViewPaddingBottom();
             if (t != topPadding || b != getPaddingBottom()) {
@@ -2379,7 +2394,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
                     if (backward && hasStories) {
                         offset += dp(DialogStoriesCell.HEIGHT_IN_DP);
                     }
-                    if (backward) {
+                    if (backward && !NonIslandHelper.globalSearch()) {
                         offset += dp(SEARCH_FIELD_HEIGHT);
                         // offset += canShowFilterTabsView ? dp(50) : 0;
                     }
@@ -2804,15 +2819,15 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
                             }
                         }
 
-                        scrollableViewNoiseSuppressor.draw(canvas, DownscaleScrollableNoiseSuppressor.DRAW_GLASS);
+                        scrollableViewNoiseSuppressor.draw(canvas, NonIslandHelper.foldersBar() ? DownscaleScrollableNoiseSuppressor.DRAW_FROSTED_GLASS : DownscaleScrollableNoiseSuppressor.DRAW_GLASS);
                     }
                 }
             });
 
             iBlur3FactoryFrostedLiquidGlass = new BlurredBackgroundDrawableViewFactory(iBlur3SourceGlassFrosted);
-            iBlur3FactoryFrostedLiquidGlass.setLiquidGlassEffectAllowed(LiteMode.isEnabled(LiteMode.FLAG_LIQUID_GLASS));
+            iBlur3FactoryFrostedLiquidGlass.setLiquidGlassEffectAllowed(!NonIslandHelper.foldersBar() && LiteMode.isEnabled(LiteMode.FLAG_LIQUID_GLASS));
             iBlur3FactoryLiquidGlass = new BlurredBackgroundDrawableViewFactory(iBlur3SourceGlass);
-            iBlur3FactoryLiquidGlass.setLiquidGlassEffectAllowed(LiteMode.isEnabled(LiteMode.FLAG_LIQUID_GLASS));
+            iBlur3FactoryLiquidGlass.setLiquidGlassEffectAllowed(!NonIslandHelper.foldersBar() && LiteMode.isEnabled(LiteMode.FLAG_LIQUID_GLASS));
             iBlur3FactoryBlur = new BlurredBackgroundDrawableViewFactory(iBlur3SourceGlassFrosted);
         } else {
             scrollableViewNoiseSuppressor = null;
@@ -4226,13 +4241,13 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
                                     viewsH += viewPage.dialogsAdapter.getItemHeight(i);
                                 }
                                 int canScrollDy = -(view.getTop() - pTop) + viewsH;
-                                if (!rightSlidingDialogContainer.hasFragment() && !(actionBar != null && actionBar.isActionModeShowed())) {
+                                if (!rightSlidingDialogContainer.hasFragment() && !(actionBar != null && actionBar.isActionModeShowed()) && !NonIslandHelper.globalSearch()) {
                                     canScrollDy -= dp(SEARCH_FIELD_HEIGHT);
                                 }
                                 if (hasStories && (viewPage.scroller.isRunning() || dialogStoriesCell.isExpanded()) && !rightSlidingDialogContainer.hasFragment() && !fixScrollYAfterArchiveOpened) {
                                     canScrollDy += dp(DialogStoriesCell.HEIGHT_IN_DP);
                                 }
-                                if ((viewPage.scroller.isRunning() || dialogStoriesCell.isExpanded()) && !rightSlidingDialogContainer.hasFragment() && !fixScrollYAfterArchiveOpened && !(actionBar != null && actionBar.isActionModeShowed())) {
+                                if ((viewPage.scroller.isRunning() || dialogStoriesCell.isExpanded()) && !rightSlidingDialogContainer.hasFragment() && !fixScrollYAfterArchiveOpened && !(actionBar != null && actionBar.isActionModeShowed()) && !NonIslandHelper.globalSearch()) {
                                     canScrollDy += dp(SEARCH_FIELD_HEIGHT);
                                 }
                                 int positiveDy = Math.abs(dy);
@@ -4740,6 +4755,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
         searchTabsViewBackground.setPadding(dp(6.666f));
         searchTabsAndFiltersLayout.setPadding(0, dp(7), 0, dp(7));
         searchTabsAndFiltersLayout.setBlurredBackground(searchTabsViewBackground);
+        NonIslandHelper.applyGlobalSearchTabs(searchTabsAndFiltersLayout, contentView);
 
         filtersView = new FiltersView(getParentActivity(), null);
         filtersView.setPadding(0, dp(3), 0, dp(3));
@@ -4831,9 +4847,13 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
                 .setColorProvider(BlurredBackgroundProviderImpl.topPanel(resourceProvider))
                 .setPadding(dp(7));
 
+            if (NonIslandHelper.foldersBar()) {
+                topPanelLayout.inu_blurHelper = desu.inugram.ui.BlurBehindHelper.create(topPanelLayout, contentView, Theme.key_windowBackgroundWhite);
+            } else {
             topPanelLayout.setPadding(dp(11), dp(21), dp(11), dp(21));
             topPanelLayout.setBlurredBackground(topPanelLayoutBackground);
             topPanelLayout.setDefaultRadiusDp(communityId != 0 ? 18 : 24);
+            }
 
             fragmentLocationContextViewWrapper = new FrameLayout(context);
             topPanelLayout.addView(fragmentLocationContextViewWrapper);
@@ -5180,6 +5200,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
             filterTabsView.setPadding(0, dp(7), 0, dp(7));
             filterTabsView.setBlurredBackground(filterTabsViewBackground);
             contentView.addView(filterTabsView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 36 + 7 + 7, Gravity.TOP, 4, 0, 4, 0));
+            NonIslandHelper.applyFilterTabBar(filterTabsView, contentView);
         }
 
         if (fragmentSearchField != null) {
@@ -5362,6 +5383,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
         }
         if (fragmentSearchField != null) {
             contentView.addView(fragmentSearchField, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.TOP, 7, -2, 7, 0));
+            NonIslandHelper.applyGlobalSearchBar(fragmentSearchField, contentView);
         }
 
 
@@ -5438,8 +5460,8 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
             fragmentSearchField.editText.setText(initialSearchString);
             fragmentSearchField.editText.setSelection(initialSearchString.length());
             initialSearchString = null;
-            if (fragmentSearchField != null) {
-                fragmentSearchField.setTranslationY(-dp(FILTER_TABS_HEIGHT) + getSearchFieldAdditionOffset());
+            if (fragmentSearchField != null && !NonIslandHelper.globalSearch()) {
+                fragmentSearchField.setTranslationY(-dp(NonIslandHelper.foldersBar() ? NonIslandHelper.FOLDERS_BAR_VISIBLE_HEIGHT_DP : FILTER_TABS_HEIGHT) + getSearchFieldAdditionOffset());
             }
         } else {
             showSearch(false, false, false);
@@ -5620,7 +5642,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
         // contentView.addView(dialogsActivityStatusLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP));
 
         if (topPanelLayout != null) {
-            contentView.addView(topPanelLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP, 0, -14, 0, 0));
+            contentView.addView(topPanelLayout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP, 0, NonIslandHelper.foldersBar() ? 0 : -14, 0, 0));
         }
 
         if (communityId != 0 && initialDialogsType != DIALOGS_TYPE_FORWARD) {
@@ -5775,6 +5797,9 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
     }
 
     private int getMaxScrollYOffset() {
+        if (NonIslandHelper.globalSearch()) {
+            return getMaxScrollYOffsetWithoutSearch();
+        }
         if (hasStories) {
             return dp(DialogStoriesCell.HEIGHT_IN_DP) + dp(SEARCH_FIELD_HEIGHT);
         } else {
@@ -6351,7 +6376,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
             dialogsHintCellVisible = false;
         }
 
-        if (rightSlidingDialogContainer != null && rightSlidingDialogContainer.hasFragment() || animatorSearchVisible.getValue()) {
+        if (rightSlidingDialogContainer != null && rightSlidingDialogContainer.hasFragment() || (animatorSearchVisible.getValue() && !NonIslandHelper.globalSearch())) {
             dialogsHintCellVisible = false;
         }
 
@@ -6371,7 +6396,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
             && folderId == 0 && communityId == 0 && initialDialogsType == DIALOGS_TYPE_DEFAULT
             && !getMessagesController().getUnconfirmedAuthController().auths.isEmpty()
             && (rightSlidingDialogContainer == null || !rightSlidingDialogContainer.hasFragment())
-            && !animatorSearchVisible.getValue();
+            && (!animatorSearchVisible.getValue() || NonIslandHelper.globalSearch());
 
         if (isVisible) {
             if (authHintCell == null) {
@@ -6394,7 +6419,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
             && folderId == 0 && communityId == 0 && initialDialogsType == DIALOGS_TYPE_DEFAULT
             && getGiftAuctionsController().hasActiveAuctions()
             && (rightSlidingDialogContainer == null || !rightSlidingDialogContainer.hasFragment())
-            && !animatorSearchVisible.getValue();
+            && (!animatorSearchVisible.getValue() || NonIslandHelper.globalSearch());
 
         if (isVisible && activeGiftAuctionsHintCell == null) {
             activeGiftAuctionsHintCell = new ActiveGiftAuctionsHintCell(getContext(), currentAccount);
@@ -6593,13 +6618,14 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
             storiesHeight = dp(DialogStoriesCell.HEIGHT_IN_DP);
         }
         float totalOffset;
+        final float inu_searchTabsH = NonIslandHelper.globalSearch() ? 0 : searchTabsHeight;
         if (hasStories) {
             totalOffset = scrollYOffset /* * (1f - searchAnimationProgress) */ +
-                    storiesHeight * (1f - searchAnimationProgress) +
-                    searchTabsHeight * searchAnimationProgress + tabsYOffset;
+                    storiesHeight * (NonIslandHelper.globalSearch() ? 1f : (1f - searchAnimationProgress)) +
+                    inu_searchTabsH * searchAnimationProgress + tabsYOffset;
         } else {
             totalOffset = scrollYOffset +
-                    searchTabsHeight * searchAnimationProgress + tabsYOffset;
+                    inu_searchTabsH * searchAnimationProgress + tabsYOffset;
         }
         totalOffset += storiesOverscroll;
 
@@ -6618,17 +6644,24 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
         float fadeViewT = totalOffset;
 
         if (filterTabsView != null) {
-            filterTabsView.setTranslationY(totalOffset - searchOffset);
+            filterTabsView.setTranslationY(totalOffset - (NonIslandHelper.globalSearch() ? 0 : searchOffset) - (NonIslandHelper.foldersBar() ? dp(NonIslandHelper.FOLDERS_BAR_OVERLAP_DP) * getFilterTabsVisibilityFactor(false) : 0));
             filtersTabVisibility = filterTabsView.getAlpha();
-            filtersTabHeight = dp(36 + 7) * filtersTabVisibility;
+            filtersTabHeight = dp(NonIslandHelper.foldersBar() ? NonIslandHelper.FOLDERS_BAR_VISIBLE_HEIGHT_DP : 36 + 7) * filtersTabVisibility;
             totalOffset += filtersTabHeight;
         }
 
         if (topPanelLayout != null) {
-            topPanelLayout.setTranslationY(lerp(
-                totalOffset - searchOffset,
-                -dp(3) - (searchTabsView == null ? dp(44) : 0),
-                animatorSearchVisible.getFloatValue()));
+            if (NonIslandHelper.globalSearch()) {
+                topPanelLayout.setTranslationY(
+                    scrollYOffset + storiesHeight + tabsYOffset + storiesOverscroll
+                    + (filterTabsView == null ? 0 : (dp(NonIslandHelper.foldersBar() ? NonIslandHelper.FOLDERS_BAR_VISIBLE_HEIGHT_DP : 36 + 7) * getFilterTabsVisibilityFactor(false)))
+                );
+            } else {
+                topPanelLayout.setTranslationY(lerp(
+                    totalOffset - searchOffset,
+                    -dp(3) - (searchTabsView == null ? dp(44) : 0),
+                    animatorSearchVisible.getFloatValue()));
+            }
             topPanelsVisibility = topPanelLayout.getMetadata().getTotalVisibility();
             topPanelsHeight = topPanelLayout.getAnimatedHeightWithPadding(0);
         }
@@ -7216,7 +7249,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
                     (filterTabsView != null && filterTabsView.getVisibility() == View.VISIBLE ? filterTabsView.getMeasuredHeight() : 0) +
                     (topPanelLayout != null ? topPanelLayout.getHeight() : 0) +
                     (dialogStoriesCell != null && dialogStoriesCellVisible ? (int) ((1f - dialogStoriesCell.getCollapsedProgress()) * dp(DialogStoriesCell.HEIGHT_IN_DP)) : 0) +
-                    (dp(SEARCH_FIELD_HEIGHT))
+                    (NonIslandHelper.globalSearch() ? 0 : dp(SEARCH_FIELD_HEIGHT))
                 );
             }
 
@@ -7528,6 +7561,9 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
             }
             if (searchTabsView == null && searchViewPager != null && !onlyDialogsAdapter && communityId == 0) {
                 searchTabsView = searchViewPager.createTabsView(false, ViewPagerFixed.SELECTOR_TYPE_BUBBLE_STYLE);
+                if (NonIslandHelper.globalSearch()) {
+                    searchTabsView.inu_applyMd3Style();
+                }
                 searchTabsAndFiltersLayout.addView(searchTabsView, 0, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.FILL));
             } else if (searchTabsAndFiltersLayout != null && onlyDialogsAdapter && communityId == 0) {
                 AndroidUtilities.removeFromParent(searchTabsView);
@@ -7594,7 +7630,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
             }
             if (searchViewPager != null) {
                 animators.add(ObjectAnimator.ofFloat(searchViewPager, View.ALPHA, show ? 1.0f : 0.0f));
-                if (hasStories) {
+                if (hasStories && !NonIslandHelper.globalSearch()) {
                     float translationY = dp(DialogStoriesCell.HEIGHT_IN_DP) + scrollYOffset + dp(SEARCH_FIELD_HEIGHT);
                     animators.add(ObjectAnimator.ofFloat(searchViewPager, SEARCH_TRANSLATION_Y, show ? translationY : 0, show ? 0 : translationY));
                 }
@@ -7715,8 +7751,8 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
                 }
                 searchViewPager.setVisibility(show ? View.VISIBLE : View.GONE);
             }
-            if (fragmentSearchField != null) {
-                fragmentSearchField.setTranslationY((show ? -dp(FILTER_TABS_HEIGHT) : 0) + getSearchFieldAdditionOffset());
+            if (fragmentSearchField != null && !NonIslandHelper.globalSearch()) {
+                fragmentSearchField.setTranslationY((show ? -dp(NonIslandHelper.foldersBar() ? NonIslandHelper.FOLDERS_BAR_VISIBLE_HEIGHT_DP : FILTER_TABS_HEIGHT) : 0) + getSearchFieldAdditionOffset());
             }
             if (dialogStoriesCell != null) {
                 if (dialogStoriesCellVisible && !isInPreviewMode() && !show) {
@@ -9075,7 +9111,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
                 viewPages[i].listView.cancelClickRunnables(true);
             }
         }
-        translateListHeight = Math.max(0, dp((hasStories ? DialogStoriesCell.HEIGHT_IN_DP : 0) + SEARCH_FIELD_HEIGHT) + scrollYOffset);
+        translateListHeight = Math.max(0, dp((hasStories ? DialogStoriesCell.HEIGHT_IN_DP : 0) + (NonIslandHelper.globalSearch() ? 0 : SEARCH_FIELD_HEIGHT)) + scrollYOffset);
         float finalTranslateListHeight = translateListHeight;
         actionBarColorAnimator = ValueAnimator.ofFloat(progressToActionMode, 0);
         actionBarColorAnimator.addUpdateListener(valueAnimator -> {
@@ -9102,7 +9138,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
                 if (actionModeFullyShowed) {
                     actionModeFullyShowed = false;
                     fixScrollYAfterArchiveOpened = true;
-                    scrollAdditionalOffset = -(dp((hasStories ? DialogStoriesCell.HEIGHT_IN_DP : 0) + SEARCH_FIELD_HEIGHT) - finalTranslateListHeight);
+                    scrollAdditionalOffset = -(dp((hasStories ? DialogStoriesCell.HEIGHT_IN_DP : 0) + (NonIslandHelper.globalSearch() ? 0 : SEARCH_FIELD_HEIGHT)) - finalTranslateListHeight);
                 } else {
                     scrollAdditionalOffset = 0;
                 }
@@ -10093,7 +10129,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
                     viewPages[i].listView.cancelClickRunnables(true);
                 }
             }
-            translateListHeight = Math.max(0, dp((hasStories ? DialogStoriesCell.HEIGHT_IN_DP : 0) + SEARCH_FIELD_HEIGHT) + scrollYOffset);
+            translateListHeight = Math.max(0, dp((hasStories ? DialogStoriesCell.HEIGHT_IN_DP : 0) + (NonIslandHelper.globalSearch() ? 0 : SEARCH_FIELD_HEIGHT)) + scrollYOffset);
             if (translateListHeight != 0) {
                 actionModeAdditionalHeight = (int) translateListHeight;
                 fragmentView.requestLayout();
@@ -10121,7 +10157,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
                     actionModeAdditionalHeight = 0;
                     if (hasStories || !NonIslandHelper.globalSearch()) {
                         actionModeFullyShowed = true;
-                        scrollAdditionalOffset = dp((hasStories ? DialogStoriesCell.HEIGHT_IN_DP : 0) + SEARCH_FIELD_HEIGHT) - finalTranslateListHeight;
+                        scrollAdditionalOffset = dp((hasStories ? DialogStoriesCell.HEIGHT_IN_DP : 0) + (NonIslandHelper.globalSearch() ? 0 : SEARCH_FIELD_HEIGHT)) - finalTranslateListHeight;
                     } else {
                         scrollAdditionalOffset = 0;
                     }
@@ -13009,7 +13045,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
             @Override
             public void setTranslationY(float translationY) {
                 super.setTranslationY(translationY);
-                if (searchTabsAndFiltersLayout != null) {
+                if (searchTabsAndFiltersLayout != null && !NonIslandHelper.globalSearch()) {
                     searchTabsAndFiltersLayout.setTranslationY(translationY);
                 }
             }
@@ -13026,7 +13062,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
             @Override
             protected void dispatchDraw(@NonNull Canvas canvas) {
                 super.dispatchDraw(canvas);
-                if (searchTabsView != null || communityId != 0) {
+                if (searchTabsView != null && !NonIslandHelper.globalSearch() || communityId != 0) {
                     final int h = dp(36 + 7 + 7 + 4);
                     final int t = actionBar.getMeasuredHeight()
                         + dp(ADDITIONAL_LIST_HEIGHT_DP)
@@ -13870,6 +13906,10 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
 
         dialogsActivityStatusLayout.setPadding(0, statusBarHeight, 0, 0);
 
+        if (fragmentSearchField != null) {
+            NonIslandHelper.updateGlobalSearchBarInsets(fragmentSearchField);
+        }
+
         updateFloatingButtonOffset();
 
         ViewGroup.MarginLayoutParams lp;
@@ -13985,7 +14025,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
             final float factor0 = searchTabsView != null ? 1 : 0;
             final float factor1 = animatorSearchVisible.getFloatValue();
             final float factor = factor0 * factor1;
-            final float s = lerp(0.98f, 1f, factor);
+            final float s = NonIslandHelper.globalSearch() ? 1f : lerp(0.98f, 1f, factor);
 
             searchTabsAndFiltersLayout.setScaleX(s);
             searchTabsAndFiltersLayout.setScaleY(s);
@@ -14025,7 +14065,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
     private void checkUi_topPanelVisible() {
         //final float factor1 = 1f - animatorSearchVisible.getFloatValue();
         // final float factor2 = 1f - getRightSlidingProgress();
-        final float factor = 1f; // factor1; // * factor2;
+        final float factor = NonIslandHelper.globalSearch() ? 1f - animatorSearchVisible.getFloatValue() : 1f; // factor1; // * factor2;
 
         if (topPanelLayout != null) {
             final float s = lerp(0.98f, 1f, factor);
@@ -14042,8 +14082,8 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
             final int bottom = AndroidUtilities.navigationBarHeight;
             final int top = dp(ADDITIONAL_LIST_HEIGHT_DP)
                 + actionBar.getMeasuredHeight()
-                + (searchTabsView != null ? dp(50) : 0)
-                + (topPanelLayout != null ? (int) topPanelLayout.getAnimatedHeightWithPadding(dp(7)) : 0);
+                + (searchTabsView != null ? dp(NonIslandHelper.globalSearch() ? NonIslandHelper.FOLDERS_BAR_VISIBLE_HEIGHT_DP : 50) : 0)
+                + (topPanelLayout != null && !NonIslandHelper.globalSearch() ? (int) topPanelLayout.getAnimatedHeightWithPadding(dp(7)) : 0);
 
             searchViewPager.setPagesPadding(top, bottom, doNotRequestLayout);
         }
@@ -14061,7 +14101,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
         if (filterTabsView != null) {
             final boolean alphaChanged = filterTabsView.getAlpha() != factor;
 
-            final float s = lerp(0.98f, 1f, factor);
+            final float s = NonIslandHelper.foldersBar() ? 1f : lerp(0.98f, 1f, factor);
             filterTabsView.setAlpha(factor);
             filterTabsView.setScaleX(s);
             filterTabsView.setScaleY(s);
@@ -14087,7 +14127,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
         }
 
         final int maxScrollWithoutSearch = getMaxScrollYOffsetWithoutSearch();
-        final float alphaByScrollOffset = 1f - MathUtils.clamp((-scrollYOffset - maxScrollWithoutSearch) / dp(SEARCH_FIELD_HEIGHT), 0, 1);
+        final float alphaByScrollOffset = NonIslandHelper.globalSearch() ? 0 : 1f - MathUtils.clamp((-scrollYOffset - maxScrollWithoutSearch) / dp(SEARCH_FIELD_HEIGHT), 0, 1);
 
         final float actionModeVisible = Math.max(progressToActionMode, animatorActionModeVisible.getFloatValue());
         final float searchFieldVisible = animatorSearchVisible.getFloatValue();
@@ -14100,7 +14140,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
 
         fragmentSearchField.setAlpha(alpha);
         fragmentSearchField.setVisibility(alpha > 0 ? View.VISIBLE : View.GONE);
-        animatorSearchButtonVisible.setValue(alpha <= 0.01f, true);
+        animatorSearchButtonVisible.setValue(NonIslandHelper.globalSearch() || alpha <= 0.01f, true);
     }
 
     private void checkUi_searchFieldStyle() {
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java
@@ -1721,7 +1721,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
                 if (target == listView && sharedMediaLayoutAttached) {
                     RecyclerListView innerListView = sharedMediaLayout.getCurrentListView();
                     int top = sharedMediaLayout.getTop();
-                    if (top == 0) {
+                    if (top == -sharedMediaLayout.inu_dockOffset()) {
                         consumed[1] = dyUnconsumed;
                         innerListView.scrollBy(0, dyUnconsumed);
                     }
@@ -1758,7 +1758,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
                 int t = sharedMediaLayout.getTop();
                 if (dy < 0) {
                     boolean scrolledInner = false;
-                    if (t <= 0) {
+                    if (t <= -sharedMediaLayout.inu_dockOffset()) {
                         RecyclerListView innerListView = sharedMediaLayout.getCurrentListView();
                         if (innerListView != null) {
                             LinearLayoutManager linearLayoutManager = (LinearLayoutManager) innerListView.getLayoutManager();
@@ -5537,7 +5537,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
                 nameTextView[a].setTextColor(getThemedColor(Theme.key_actionBarDefaultTitle));
             }
             nameTextView[a].setPadding(0, AndroidUtilities.dp(6), 0, AndroidUtilities.dp(a == 0 ? 12 : 4));
-            nameTextView[a].setTextSizePx(dp(17.5f));
+            nameTextView[a].setTextSizePx(dp(desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? 18 : 17.5f));
             nameTextView[a].setGravity(Gravity.LEFT);
             nameTextView[a].setTypeface(AndroidUtilities.bold());
             nameTextView[a].setLeftDrawableTopPadding(-AndroidUtilities.dp(1.3f));
@@ -5603,7 +5603,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
 
             onlineTextView[a].setEllipsizeByGradient(true);
             onlineTextView[a].setTextColor(applyPeerColor(getThemedColor(Theme.key_actionBarDefaultSubtitle), true, null));
-            onlineTextView[a].setTextSizePx(dp(13.5f));
+            onlineTextView[a].setTextSizePx(dp(desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? 14 : 13.5f));
             onlineTextView[a].setGravity(Gravity.LEFT);
             onlineTextView[a].setAlpha(a == 0 ? 0.0f : 1.0f);
             onlineTextView[a].setPivotX(dp(8));
@@ -5640,7 +5640,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
             protected TextView createTextView() {
                 TextView textView = new TextView(context);
                 textView.setTextColor(getThemedColor(Theme.key_player_actionBarSubtitle));
-                textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, AndroidUtilities.dp(13.5f));
+                textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, AndroidUtilities.dp(desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? 14 : 13.5f));
                 textView.setSingleLine(true);
                 textView.setEllipsize(TextUtils.TruncateAt.END);
                 textView.setGravity(Gravity.LEFT);
@@ -5763,7 +5763,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
                 if (participantsMap != null && !usersEndReached && layoutManager.findLastVisibleItemPosition() > membersEndRow - 8) {
                     getChannelParticipants(false);
                 }
-                sharedMediaLayout.setPinnedToTop(sharedMediaLayout.getY() <= 0);
+                sharedMediaLayout.setPinnedToTop(sharedMediaLayout.getY() <= -sharedMediaLayout.inu_dockOffset());
                 updateBottomButtonY();
             }
         });
@@ -8012,7 +8012,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
         boolean searchVisible = imageUpdater == null && actionBar.isSearchFieldVisible();
         if (sharedMediaRow != -1 && !searchVisible) {
             holder = (RecyclerListView.Holder) listView.findViewHolderForAdapterPosition(sharedMediaRow);
-            mediaHeaderVisible = holder != null && holder.itemView.getTop() <= 0;
+            mediaHeaderVisible = holder != null && holder.itemView.getTop() <= -sharedMediaLayout.inu_dockOffset();
         } else {
             mediaHeaderVisible = searchVisible;
         }
@@ -8247,8 +8247,8 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
                 continue;
             }
 
-            float nameX = lerp((prevAvatarTranslation - dp(109) + dp(48)), backwardInitialValues[12 + a * 2], backwardDiff);
-            float onlineX = lerp((prevAvatarTranslation - dp(109) + dp(48)), backwardInitialValues[12 + a * 2 + 1], backwardDiff);
+            float nameX = lerp((prevAvatarTranslation - dp(109) + dp(desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? 54 : 48)), backwardInitialValues[12 + a * 2], backwardDiff);
+            float onlineX = lerp((prevAvatarTranslation - dp(109) + dp(desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? 54 : 48)), backwardInitialValues[12 + a * 2 + 1], backwardDiff);
 
             nameTextView[a].setTranslationX(nameX);
             nameTextView[a].setTranslationY(nameY);
@@ -8608,9 +8608,9 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
                 float avY = (actionBar.getOccupyStatusBar() ? AndroidUtilities.statusBarHeight : 0) + ActionBar.getCurrentActionBarHeight() / 2.0f - 21 * AndroidUtilities.density + actionBar.getTranslationY();
 //                metaball.setVisibility(View.GONE);
 
-                nameTextView[0].setTranslationX((prevAvatarTranslation - dp(109) + dp(48)));
+                nameTextView[0].setTranslationX((prevAvatarTranslation - dp(109) + dp(desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? 54 : 48)));
                 nameTextView[0].setTranslationY((float) Math.floor(avY) + AndroidUtilities.dp(1.3f));
-                onlineTextView[0].setTranslationX((prevAvatarTranslation - dp(109) + dp(48)));
+                onlineTextView[0].setTranslationX((prevAvatarTranslation - dp(109) + dp(desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? 54 : 48)));
                 onlineTextView[0].setTranslationY((float) Math.floor(avY) + AndroidUtilities.dp(24));
                 nameTextView[0].setScaleX(1.0f);
                 nameTextView[0].setScaleY(1.0f);
@@ -8725,7 +8725,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
                 final float avatarBottom = (float) Math.floor(endNameY) + (avatarContainer.getHeight() * avatarContainer.getScaleY() + dpf2(8)) * (openAnimationInProgress ? avatarAnimationProgress : diff);
                 nameY = avatarBottom + dp(1.3f) + dp(7) * diff + titleAnimationsYDiff * (1f - avatarAnimationProgress);
                 onlineY = avatarBottom + dp(24) + (float) Math.floor(11 * AndroidUtilities.density) * diff;
-                final float minimizedX = openAnimationInProgress ? (prevAvatarTranslation - dp(109) + dp(48)) : -dpf2(42 + 4);
+                final float minimizedX = openAnimationInProgress ? (prevAvatarTranslation - dp(109) + dp(desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? 54 : 48)) : -dpf2(42 + 4);
 
                 if (showStatusButton != null) {
                     showStatusButton.setAlpha((int) (0xFF * diff));
@@ -15492,10 +15492,10 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
             if (animated) {
                 LinearSmoothScrollerCustom linearSmoothScroller = new LinearSmoothScrollerCustom(getContext(), LinearSmoothScrollerCustom.POSITION_TOP, .6f);
                 linearSmoothScroller.setTargetPosition(sharedMediaRow);
-                linearSmoothScroller.setOffset(-listView.getPaddingTop());
+                linearSmoothScroller.setOffset(-listView.getPaddingTop() - sharedMediaLayout.inu_dockOffset());
                 layoutManager.startSmoothScroll(linearSmoothScroller);
             } else {
-                layoutManager.scrollToPositionWithOffset(sharedMediaRow, -listView.getPaddingTop());
+                layoutManager.scrollToPositionWithOffset(sharedMediaRow, -listView.getPaddingTop() - sharedMediaLayout.inu_dockOffset());
             }
         }
     }
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/SearchTabsAndFiltersLayout.java b/TMessagesProj/src/main/java/org/telegram/ui/SearchTabsAndFiltersLayout.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/SearchTabsAndFiltersLayout.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/SearchTabsAndFiltersLayout.java
@@ -15,6 +15,7 @@ import org.telegram.ui.Components.blur3.drawable.BlurredBackgroundDrawable;
 public class SearchTabsAndFiltersLayout extends FrameLayout implements Theme.Colorable {
     private final Path clipPath = new Path();
     private BlurredBackgroundDrawable blurredBackgroundDrawable;
+    public desu.inugram.ui.BlurBehindHelper inu_blurHelper;
 
     public SearchTabsAndFiltersLayout(@NonNull Context context) {
         super(context);
@@ -30,6 +31,11 @@ public class SearchTabsAndFiltersLayout extends FrameLayout implements Theme.Col
 
     @Override
     protected void dispatchDraw(@NonNull Canvas canvas) {
+        if (inu_blurHelper != null) {
+            inu_blurHelper.draw(canvas);
+            super.dispatchDraw(canvas);
+            return;
+        }
         canvas.save();
         canvas.clipPath(clipPath);
         super.dispatchDraw(canvas);
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/bots/BotAdView.java b/TMessagesProj/src/main/java/org/telegram/ui/bots/BotAdView.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/bots/BotAdView.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/bots/BotAdView.java
@@ -59,7 +59,7 @@ public class BotAdView extends FrameLayout {
         layout = new LinearLayout(context);
         layout.setOrientation(LinearLayout.HORIZONTAL);
         layout.setPadding(dp(16), dp(5), dp(8), dp(5));
-        ScaleStateListAnimator.apply(layout, .025f, 1.4f);
+        if (!desu.inugram.helpers.theme.NonIslandHelper.chatElements()) ScaleStateListAnimator.apply(layout, .025f, 1.4f);
         addView(layout, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.FILL));
 
         setBackground(Theme.createRadSelectorDrawable(Theme.multAlpha(Theme.getColor(Theme.key_featuredStickers_addButton, resourcesProvider), .1f), 0, 0));
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/bots/BotCommandsMenuContainer.java b/TMessagesProj/src/main/java/org/telegram/ui/bots/BotCommandsMenuContainer.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/bots/BotCommandsMenuContainer.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/bots/BotCommandsMenuContainer.java
@@ -288,8 +288,8 @@ public class BotCommandsMenuContainer extends FrameLayout implements NestedScrol
 
     public void setBackgroundDrawable(@NonNull BlurredBackgroundDrawable backgroundDrawable) {
         this.backgroundDrawable = backgroundDrawable;
-        this.backgroundDrawable.setRadius(dp(22));
-        this.backgroundDrawable.setPadding(dp(5));
+        this.backgroundDrawable.setRadius(desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? 0 : dp(22));
+        this.backgroundDrawable.setPadding(desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? 0 : dp(5));
 
         listView.setOutlineProvider(backgroundDrawable.getViewOutlineProvider());
     }
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/bots/ChatAttachAlertBotWebViewLayout.java b/TMessagesProj/src/main/java/org/telegram/ui/bots/ChatAttachAlertBotWebViewLayout.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/bots/ChatAttachAlertBotWebViewLayout.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/bots/ChatAttachAlertBotWebViewLayout.java
@@ -31,6 +31,7 @@ import androidx.dynamicanimation.animation.FloatValueHolder;
 import androidx.dynamicanimation.animation.SpringAnimation;
 import androidx.dynamicanimation.animation.SpringForce;
 import androidx.recyclerview.widget.ChatListItemAnimator;
+import desu.inugram.helpers.theme.NonIslandHelper;
 
 import org.json.JSONObject;
 import org.telegram.messenger.AndroidUtilities;
@@ -221,7 +222,7 @@ public class ChatAttachAlertBotWebViewLayout extends ChatAttachAlert.AttachAlert
         swipeContainer = new WebViewSwipeContainer(context) {
             @Override
             protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
-                super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(MeasureSpec.getSize(heightMeasureSpec) - ActionBar.getCurrentActionBarHeight() - dp(84) + measureOffsetY, MeasureSpec.EXACTLY));
+                super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(MeasureSpec.getSize(heightMeasureSpec) - ActionBar.getCurrentActionBarHeight() - dp(NonIslandHelper.chatElements() ? 52 : 84) + measureOffsetY, MeasureSpec.EXACTLY));
             }
         };
         swipeContainer.addView(webViewContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
@@ -239,7 +240,7 @@ public class ChatAttachAlertBotWebViewLayout extends ChatAttachAlert.AttachAlert
         swipeContainer.setIsKeyboardVisible(obj -> parentAlert.sizeNotifierFrameLayout.getKeyboardHeight() >= dp(20));
 
         addView(swipeContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
-        addView(progressView = new WebProgressView(context, resourcesProvider), LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.BOTTOM, 0, 0, 0, 84));
+        addView(progressView = new WebProgressView(context, resourcesProvider), LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.BOTTOM, 0, 0, 0, NonIslandHelper.chatElements() ? 52 : 84));
 
         webViewContainer.setWebViewProgressListener(progress -> {
             progressView.setLoadProgressAnimated(progress);
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/iv/RichEditor.java b/TMessagesProj/src/main/java/org/telegram/ui/iv/RichEditor.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/iv/RichEditor.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/iv/RichEditor.java
@@ -218,7 +218,7 @@ public class RichEditor extends BaseFragment implements NotificationCenter.Notif
                     animateEnterView.sendButtonContainer.setVisibility(View.VISIBLE);
 //                    topGradient.setVisibility(View.VISIBLE);
 //                    bottomGradient.setVisibility(View.VISIBLE);
-                    animateInputBackground.setRadius(dp(ChatInputViewsContainer.INPUT_BUBBLE_RADIUS));
+                    animateInputBackground.setRadius(dp(desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? 0 : ChatInputViewsContainer.INPUT_BUBBLE_RADIUS));
                     animateInputBackground.setAlpha(0xFF);
                     animateInputView.drawInputBackground = true;
                     animateInputView.invalidate();
@@ -405,7 +405,7 @@ public class RichEditor extends BaseFragment implements NotificationCenter.Notif
                 if (animatingOpen && animateInputBackground != null) {
                     rect.set(0, 0, getWidth(), getHeight());
                     rect.inset(-dp(7), -dp(7));
-                    final float rad = lerp(dpf2(ChatInputViewsContainer.INPUT_BUBBLE_RADIUS), 0, animateOpenProgress);
+                    final float rad = lerp(dpf2(desu.inugram.helpers.theme.NonIslandHelper.chatElements() ? 0 : ChatInputViewsContainer.INPUT_BUBBLE_RADIUS), 0, animateOpenProgress);
                     lerp(animateFromRect, rect, animateOpenProgress, rect);
 
                     tempRect.set(animateInputBackground.getBounds());
