From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: alina sireneva <alina@tei.su>
Date: Mon, 13 Apr 2026 03:28:49 +0300
Subject: hide fade views

---
 .../org/telegram/ui/Components/ChatAttachAlert.java  |  2 ++
 .../DialogsActivityTopBubblesFadeView.java           |  1 +
 .../java/org/telegram/ui/Components/ShareAlert.java  |  1 +
 .../ui/Components/chat/ChatInputViewsContainer.java  |  1 +
 .../chat/layouts/ChatActivityFadeView.java           |  1 +
 .../main/java/org/telegram/ui/MainTabsActivity.java  | 12 +++++++++++-
 6 files changed, 17 insertions(+), 1 deletion(-)

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
@@ -2710,6 +2710,7 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N
 
             @Override
             public void draw(@NonNull Canvas canvas) {
+                if (desu.inugram.helpers.chat.ChatHelper.shouldHideFadeView()) return;
                 super.draw(canvas);
                 bottomFadeDrawable.draw(canvas);
             }
@@ -7175,6 +7176,7 @@ public class ChatAttachAlert extends BottomSheet implements NotificationCenter.N
 
         @Override
         protected void onDraw(@NonNull Canvas canvas) {
+            if (desu.inugram.helpers.chat.ChatHelper.shouldHideFadeView()) return;
             gradientProtectionDrawable.setColor(Theme.multAlpha(Theme.getColor(bgKeyColor, resourcesProvider), 0.5f));
             gradientProtectionDrawable.draw(canvas);
             gradientProtectionDrawable2.setColor(Theme.multAlpha(Theme.getColor(bgKeyColor, resourcesProvider), 0.95f));
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/DialogsActivityTopBubblesFadeView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/DialogsActivityTopBubblesFadeView.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/DialogsActivityTopBubblesFadeView.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/DialogsActivityTopBubblesFadeView.java
@@ -58,6 +58,7 @@ public class DialogsActivityTopBubblesFadeView extends View {
 
     @Override
     protected void onDraw(@NonNull Canvas canvas) {
+        if (desu.inugram.helpers.chat.ChatHelper.shouldHideFadeView()) return;
         canvas.drawRect(0, 0, getMeasuredWidth(), fadeStart + fadeHeight, paint);
     }
 }
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ShareAlert.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ShareAlert.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ShareAlert.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ShareAlert.java
@@ -1336,6 +1336,7 @@ public class ShareAlert extends BottomSheet implements NotificationCenter.Notifi
         bottomFadeView = new View(context) {
             @Override
             public void draw(@NonNull Canvas canvas) {
+                if (desu.inugram.helpers.chat.ChatHelper.shouldHideFadeView()) return;
                 super.draw(canvas);
                 fadeDrawable.setBounds(0, getMeasuredHeight() - systemInsets.bottom - dp(72), getMeasuredWidth(), getMeasuredHeight());
                 fadeDrawable.draw(canvas);
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
@@ -55,6 +55,7 @@ public class ChatInputViewsContainer extends FrameLayout {
         fadeView = new View(context) {
             @Override
             protected void dispatchDraw(@NonNull Canvas canvas) {
+                if (desu.inugram.helpers.chat.ChatHelper.shouldHideFadeView()) return;
                 if (backgroundWithFadeDrawable != null) {
                     backgroundWithFadeDrawable.draw(canvas);
                 }
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/chat/layouts/ChatActivityFadeView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/chat/layouts/ChatActivityFadeView.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/chat/layouts/ChatActivityFadeView.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/chat/layouts/ChatActivityFadeView.java
@@ -104,6 +104,7 @@ public class ChatActivityFadeView extends View implements Theme.Colorable {
 
     @Override
     protected void onDraw(@NonNull Canvas canvas) {
+        if (desu.inugram.helpers.chat.ChatHelper.shouldHideFadeView()) return;
         super.onDraw(canvas);
         fadeDrawableTop.draw(canvas);
         fadeDrawableBottom.draw(canvas);
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/MainTabsActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/MainTabsActivity.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/MainTabsActivity.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/MainTabsActivity.java
@@ -406,7 +406,13 @@ public class MainTabsActivity extends ViewPagerActivity implements NotificationC
 
         contentView.addView(fadeView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 0, Gravity.BOTTOM));
 
-        tabsViewWrapper = new FrameLayout(context);
+        tabsViewWrapper = new FrameLayout(context) {
+            @Override
+            public boolean onTouchEvent(android.view.MotionEvent event) {
+                if (desu.inugram.helpers.chat.ChatHelper.shouldHideFadeView()) return false;
+                return super.onTouchEvent(event);
+            }
+        };
         tabsViewWrapper.setOnClickListener(v -> {});
         tabsViewWrapper.addView(tabsView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, MainTabsHelper.getMainTabsHeightWithMargins(), Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL));
         tabsViewWrapper.setClipToPadding(false);
@@ -1095,6 +1101,10 @@ public class MainTabsActivity extends ViewPagerActivity implements NotificationC
         if (viewPager == null || fadeView == null || MainTabsHelper.isHidden()) {
             return;
         }
+        if (desu.inugram.helpers.chat.ChatHelper.shouldHideFadeView()) {
+            fadeView.setVisibility(View.GONE);
+            return;
+        }
 
         final float animatedPosition = viewPager.getPositionAnimated();
         final float isProfile = 1f - MathUtils.clamp(Math.abs(MainTabsHelper.positionOffset(POSITION_PROFILE) - animatedPosition), 0, 1);
