From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: alina sireneva <alina@tei.su>
Date: Wed, 22 Apr 2026 10:42:47 +0300
Subject: customizable animation speed multiplier for most animations

---
 .../main/java/org/telegram/ui/ActionBar/ActionBarLayout.java   | 2 +-
 .../main/java/org/telegram/ui/Components/AnimatedFloat.java    | 3 ++-
 .../src/main/java/org/telegram/ui/ProfileActivity.java         | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

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
@@ -1827,7 +1827,7 @@ public class ActionBarLayout extends FrameLayout implements INavigationLayout, F
                     dt = 18;
                 }
                 lastFrameTime = newTime;
-                float duration = preview && open ? 190.0f : 150.0f;
+                float duration = (preview && open ? 190.0f : 150.0f) / desu.inugram.InuConfig.ANIMATION_SPEED.getValue();
                 animationProgress += dt / duration;
                 if (animationProgress > 1.0f) {
                     animationProgress = 1.0f;
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/AnimatedFloat.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/AnimatedFloat.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/AnimatedFloat.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/AnimatedFloat.java
@@ -161,10 +161,11 @@ public class AnimatedFloat {
         return getValue();
     }
 
+    public static float inu_multiplier = 1f;
     public float getValue() {
         if (transition) {
             final long now = SystemClock.elapsedRealtime();
-            final float t = MathUtils.clamp((now - transitionStart - transitionDelay) / (float) transitionDuration, 0, 1);
+            final float t = MathUtils.clamp((now - transitionStart - transitionDelay) / ((float) transitionDuration / inu_multiplier), 0, 1);
             if (now - transitionStart >= transitionDelay) {
                 if (transitionInterpolator == null) {
                     value = AndroidUtilities.lerp(startValue, targetValue, t);
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
@@ -8488,7 +8488,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
                         if (!ignoreScrollOnFullExpand && view != null /*&& hasActions*/) {
                             justFullyExpanded = true;
                             final int actionBarHeight = ActionBar.getCurrentActionBarHeight() + (actionBar.getOccupyStatusBar() ? AndroidUtilities.statusBarHeight : 0);
-                            listView.smoothScrollBy(0, view.getTop() - listView.getMeasuredWidth() - getActionsExtraHeight() + actionBarHeight, (int) expandAnimator.getDuration(), (Interpolator) expandAnimator.getInterpolator());
+                            listView.smoothScrollBy(0, view.getTop() - listView.getMeasuredWidth() - getActionsExtraHeight() + actionBarHeight, Math.max(1, Math.round(expandAnimator.getDuration() / desu.inugram.InuConfig.ANIMATION_SPEED.getValue())), (Interpolator) expandAnimator.getInterpolator());
                             listView.canStopFlinger = false;
                         }
                         expandNameYStartedFrom = nameTextView[1].getTranslationY();
