Simplified compose/share workaround

pull/194/head
M66B 4 years ago
parent ccd274fe9e
commit 38bfd63a9c

@ -211,7 +211,6 @@
android:name=".ActivityCompose" android:name=".ActivityCompose"
android:exported="true" android:exported="true"
android:launchMode="singleTask" android:launchMode="singleTask"
android:taskAffinity="eu.faircode.email.compose"
android:parentActivityName=".ActivityView"> android:parentActivityName=".ActivityView">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />

@ -60,12 +60,7 @@ public class ActivityCompose extends ActivityBase implements FragmentManager.OnB
@Override @Override
public void onBackStackChanged() { public void onBackStackChanged() {
if (getSupportFragmentManager().getBackStackEntryCount() == 0) { if (getSupportFragmentManager().getBackStackEntryCount() == 0) {
Intent intent = getIntent(); if (!isShared(getIntent().getAction())) {
if (intent != null && isShared(intent.getAction())) {
finishAffinity();
return;
}
Intent parent = getParentActivityIntent(); Intent parent = getParentActivityIntent();
if (parent != null) if (parent != null)
if (shouldUpRecreateTask(parent)) if (shouldUpRecreateTask(parent))
@ -76,6 +71,7 @@ public class ActivityCompose extends ActivityBase implements FragmentManager.OnB
parent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); parent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(parent); startActivity(parent);
} }
}
finishAndRemoveTask(); finishAndRemoveTask();
} }
@ -85,8 +81,6 @@ public class ActivityCompose extends ActivityBase implements FragmentManager.OnB
Bundle args; Bundle args;
String action = intent.getAction(); String action = intent.getAction();
if (isShared(action)) { if (isShared(action)) {
Helper.excludeFromRecents(this);
args = new Bundle(); args = new Bundle();
args.putString("action", "new"); args.putString("action", "new");
args.putLong("account", -1); args.putLong("account", -1);

Loading…
Cancel
Save