Conditionally open unified inbox from notification

This commit is contained in:
M66B 2023-10-09 08:11:34 +02:00
parent 892ed3a0ad
commit 3474561692
1 changed files with 14 additions and 10 deletions

View File

@ -2019,6 +2019,9 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
boolean notify_open_folder = prefs.getBoolean("notify_open_folder", false);
if (account > 0 && folder > 0 && !TextUtils.isEmpty(type) && notify_open_folder) {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) {
if (group >= 0)
getSupportFragmentManager().popBackStack("unified", 0);
else {
getSupportFragmentManager().popBackStack("messages", FragmentManager.POP_BACK_STACK_INCLUSIVE);
Bundle args = new Bundle();
@ -2034,6 +2037,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
fragmentTransaction.commit();
}
}
}
onViewThread(intent);
} else if (action.startsWith("widget")) {