Skip to content

Commit

Permalink
update to 9.4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
xaxtix authored and immat0x1 committed Feb 27, 2023
1 parent 808b531 commit b87cb68
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1480,7 +1480,7 @@ public boolean addFragmentToStack(BaseFragment fragment, int position) {
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();
Expand All @@ -1499,11 +1499,13 @@ public boolean addFragmentToStack(BaseFragment fragment, int position) {
}
}
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
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);
Expand Down
12 changes: 5 additions & 7 deletions TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3020,7 +3020,7 @@ private boolean handleIntent(Intent intent, boolean isNew, boolean restore, bool
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 {
Expand All @@ -3030,29 +3030,27 @@ private boolean handleIntent(Intent intent, boolean isNew, boolean restore, bool
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);
dialogsActivity.setSideMenu(sideMenu);
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);
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ RELEASE_KEY_PASSWORD=***REMOVED***
RELEASE_KEY_ALIAS=exteraGram
RELEASE_STORE_PASSWORD=***REMOVED***
org.gradle.jvmargs=-Xmx4096M -XX:MaxPermSize=4096m -XX:+UseParallelGC -Dfile.encoding=UTF-8
APP_VERSION_NAME=9.4.7
APP_VERSION_CODE=3160
APP_VERSION_NAME=9.4.8
APP_VERSION_CODE=3161
APP_PACKAGE=com.exteragram.messenger
org.gradle.daemon=true
org.gradle.parallel=true
Expand Down

0 comments on commit b87cb68

Please sign in to comment.