mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-18 10:39:55 +01:00
Simplified compose/share workaround
This commit is contained in:
@@ -60,23 +60,19 @@ public class ActivityCompose extends ActivityBase implements FragmentManager.OnB
|
||||
@Override
|
||||
public void onBackStackChanged() {
|
||||
if (getSupportFragmentManager().getBackStackEntryCount() == 0) {
|
||||
Intent intent = getIntent();
|
||||
if (intent != null && isShared(intent.getAction())) {
|
||||
finishAffinity();
|
||||
return;
|
||||
if (!isShared(getIntent().getAction())) {
|
||||
Intent parent = getParentActivityIntent();
|
||||
if (parent != null)
|
||||
if (shouldUpRecreateTask(parent))
|
||||
TaskStackBuilder.create(this)
|
||||
.addNextIntentWithParentStack(parent)
|
||||
.startActivities();
|
||||
else {
|
||||
parent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
startActivity(parent);
|
||||
}
|
||||
}
|
||||
|
||||
Intent parent = getParentActivityIntent();
|
||||
if (parent != null)
|
||||
if (shouldUpRecreateTask(parent))
|
||||
TaskStackBuilder.create(this)
|
||||
.addNextIntentWithParentStack(parent)
|
||||
.startActivities();
|
||||
else {
|
||||
parent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
startActivity(parent);
|
||||
}
|
||||
|
||||
finishAndRemoveTask();
|
||||
}
|
||||
}
|
||||
@@ -85,8 +81,6 @@ public class ActivityCompose extends ActivityBase implements FragmentManager.OnB
|
||||
Bundle args;
|
||||
String action = intent.getAction();
|
||||
if (isShared(action)) {
|
||||
Helper.excludeFromRecents(this);
|
||||
|
||||
args = new Bundle();
|
||||
args.putString("action", "new");
|
||||
args.putLong("account", -1);
|
||||
|
||||
Reference in New Issue
Block a user