mirror of https://github.com/M66B/FairEmail.git
Simplified compose/share workaround
This commit is contained in:
parent
ccd274fe9e
commit
38bfd63a9c
|
@ -211,7 +211,6 @@
|
|||
android:name=".ActivityCompose"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTask"
|
||||
android:taskAffinity="eu.faircode.email.compose"
|
||||
android:parentActivityName=".ActivityView">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue