From 8bb3438f624cfc322b8da3524955e1dc61bdc4a6 Mon Sep 17 00:00:00 2001 From: xaxtix Date: Mon, 27 Feb 2023 14:35:15 +0400 Subject: [PATCH] update to 9.4.8 --- .../java/org/telegram/messenger/BuildVars.java | 4 ++-- .../org/telegram/ui/ActionBar/ActionBarLayout.java | 14 ++++++++------ .../telegram/ui/ActionBar/INavigationLayout.java | 2 ++ .../main/java/org/telegram/ui/LaunchActivity.java | 12 +++++------- gradle.properties | 4 ++-- 5 files changed, 19 insertions(+), 17 deletions(-) diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java b/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java index c984fc721..86e0b2f11 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java @@ -24,8 +24,8 @@ public class BuildVars { public static boolean USE_CLOUD_STRINGS = true; public static boolean CHECK_UPDATES = true; public static boolean NO_SCOPED_STORAGE = Build.VERSION.SDK_INT <= 29; - public static int BUILD_VERSION = 3160; - public static String BUILD_VERSION_STRING = "9.4.7"; + public static int BUILD_VERSION = 3161; + public static String BUILD_VERSION_STRING = "9.4.8"; public static int APP_ID = 4; public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103"; 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 e031d1998..85953e70d 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarLayout.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarLayout.java @@ -1503,7 +1503,7 @@ public class ActionBarLayout extends FrameLayout implements INavigationLayout, F return false; } fragment.setParentLayout(this); - if (position == -1) { + if (position == -1 || position == INavigationLayout.FORCE_NOT_ATTACH_VIEW) { if (!fragmentsStack.isEmpty()) { BaseFragment previousFragment = fragmentsStack.get(fragmentsStack.size() - 1); previousFragment.onPause(); @@ -1522,11 +1522,13 @@ public class ActionBarLayout extends FrameLayout implements INavigationLayout, F } } fragmentsStack.add(fragment); - attachView(fragment); - fragment.onResume(); - fragment.onTransitionAnimationEnd(false, true); - fragment.onTransitionAnimationEnd(true, true); - fragment.onBecomeFullyVisible(); + if (position != INavigationLayout.FORCE_NOT_ATTACH_VIEW) { + attachView(fragment); + fragment.onResume(); + fragment.onTransitionAnimationEnd(false, true); + fragment.onTransitionAnimationEnd(true, true); + fragment.onBecomeFullyVisible(); + } onFragmentStackChanged("addFragmentToStack " + position); } else { fragmentsStack.add(position, fragment); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/INavigationLayout.java b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/INavigationLayout.java index 61d35f59d..de6fbcd08 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/INavigationLayout.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/INavigationLayout.java @@ -20,6 +20,8 @@ import java.util.List; public interface INavigationLayout { int REBUILD_FLAG_REBUILD_LAST = 1, REBUILD_FLAG_REBUILD_ONLY_LAST = 2; + int FORCE_NOT_ATTACH_VIEW = -2; + boolean presentFragment(NavigationParams params); boolean checkTransitionAnimation(); boolean addFragmentToStack(BaseFragment fragment, int position); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java index 8f2124c52..e34535483 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java @@ -2947,7 +2947,7 @@ public class LaunchActivity extends BasePermissionsActivity implements INavigati if (AndroidUtilities.isTablet()) { if (!UserConfig.getInstance(currentAccount).isClientActivated()) { if (layersActionBarLayout.getFragmentStack().isEmpty()) { - layersActionBarLayout.addFragmentToStack(getClientNotActivatedFragment()); + layersActionBarLayout.addFragmentToStack(getClientNotActivatedFragment(), INavigationLayout.FORCE_NOT_ATTACH_VIEW); drawerLayoutContainer.setAllowOpenDrawer(false, false); } } else { @@ -2957,14 +2957,14 @@ public class LaunchActivity extends BasePermissionsActivity implements INavigati if (searchQuery != null) { dialogsActivity.setInitialSearchString(searchQuery); } - actionBarLayout.addFragmentToStack(dialogsActivity); + actionBarLayout.addFragmentToStack(dialogsActivity, INavigationLayout.FORCE_NOT_ATTACH_VIEW); drawerLayoutContainer.setAllowOpenDrawer(true, false); } } } else { if (actionBarLayout.getFragmentStack().isEmpty()) { if (!UserConfig.getInstance(currentAccount).isClientActivated()) { - actionBarLayout.addFragmentToStack(getClientNotActivatedFragment()); + actionBarLayout.addFragmentToStack(getClientNotActivatedFragment(), INavigationLayout.FORCE_NOT_ATTACH_VIEW); drawerLayoutContainer.setAllowOpenDrawer(false, false); } else { DialogsActivity dialogsActivity = new DialogsActivity(null); @@ -2972,14 +2972,12 @@ public class LaunchActivity extends BasePermissionsActivity implements INavigati if (searchQuery != null) { dialogsActivity.setInitialSearchString(searchQuery); } - actionBarLayout.addFragmentToStack(dialogsActivity); + actionBarLayout.addFragmentToStack(dialogsActivity, INavigationLayout.FORCE_NOT_ATTACH_VIEW); drawerLayoutContainer.setAllowOpenDrawer(true, false); } } } - if (SharedConfig.useLNavigation) { - actionBarLayout.rebuildFragments(INavigationLayout.REBUILD_FLAG_REBUILD_LAST); - } + actionBarLayout.rebuildFragments(INavigationLayout.REBUILD_FLAG_REBUILD_LAST); if (AndroidUtilities.isTablet()) { layersActionBarLayout.rebuildFragments(INavigationLayout.REBUILD_FLAG_REBUILD_LAST); rightActionBarLayout.rebuildFragments(INavigationLayout.REBUILD_FLAG_REBUILD_LAST); diff --git a/gradle.properties b/gradle.properties index 5ab01576d..8ba37d4b3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,8 +13,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true #Sat Mar 12 05:53:50 MSK 2016 -APP_VERSION_NAME=9.4.7 -APP_VERSION_CODE=3160 +APP_VERSION_NAME=9.4.8 +APP_VERSION_CODE=3161 APP_PACKAGE=org.telegram.messenger RELEASE_KEY_PASSWORD=android RELEASE_KEY_ALIAS=androidkey