Skip to content

Commit

Permalink
better check
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga committed Jan 28, 2024
1 parent 6735cc7 commit 127ea53
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,11 @@ public static void removeFromActivityStack(Activity activity)
{
if (activity != null) {
activityStack.remove(activity);
if (activityStack.size() == 1 && activityStack.get(0).get()
.getLocalClassName().equals(TiApplication.getAppRootOrCurrentActivity().getLocalClassName())) {
// only base activity is visible - close app
terminateActivityStack();
if (activityStack.size() == 1) {
boolean isTiRootActivity = (activityStack.get(0).get() instanceof TiRootActivity);
if (isTiRootActivity) {
terminateActivityStack();
}
}
}
}
Expand Down

0 comments on commit 127ea53

Please sign in to comment.