mirror of https://github.com/M66B/FairEmail.git
Fixed handling compose pause
This commit is contained in:
parent
aab40f78c0
commit
d1af6fa853
|
@ -352,6 +352,7 @@ public class FragmentCompose extends FragmentEx {
|
|||
super.onActivityCreated(savedInstanceState);
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
if (working < 0) {
|
||||
Bundle args = new Bundle();
|
||||
args.putString("action", getArguments().getString("action"));
|
||||
args.putLong("id", getArguments().getLong("id", -1));
|
||||
|
@ -365,6 +366,15 @@ public class FragmentCompose extends FragmentEx {
|
|||
args.putString("body", getArguments().getString("body"));
|
||||
args.putParcelableArrayList("attachments", getArguments().getParcelableArrayList("attachments"));
|
||||
draftLoader.load(this, args);
|
||||
} else {
|
||||
Bundle args = new Bundle();
|
||||
args.putString("action", "edit");
|
||||
args.putLong("id", working);
|
||||
args.putLong("account", -1);
|
||||
args.putLong("reference", -1);
|
||||
args.putLong("answer", -1);
|
||||
draftLoader.load(this, args);
|
||||
}
|
||||
} else {
|
||||
encrypted = savedInstanceState.getString("encrypted");
|
||||
|
||||
|
|
|
@ -54,13 +54,14 @@ public class FragmentEx extends Fragment {
|
|||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
Log.i(Helper.TAG, "Save instance " + this);
|
||||
super.onSaveInstanceState(outState);
|
||||
outState.putString("subtitle", subtitle);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
Log.i(Helper.TAG, "Create " + this);
|
||||
Log.i(Helper.TAG, "Create " + this + " saved=" + (savedInstanceState != null));
|
||||
super.onCreate(savedInstanceState);
|
||||
if (savedInstanceState != null)
|
||||
subtitle = savedInstanceState.getString("subtitle");
|
||||
|
@ -74,7 +75,7 @@ public class FragmentEx extends Fragment {
|
|||
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
Log.i(Helper.TAG, "Activity " + this);
|
||||
Log.i(Helper.TAG, "Activity " + this + " saved=" + (savedInstanceState != null));
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue