1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 02:07:12 +00:00

Autosave on leaving compose

Fixes #4
This commit is contained in:
M66B 2018-08-11 18:35:22 +00:00
parent ab6e8ed6dd
commit f85ef0579b

View file

@ -315,6 +315,12 @@ public class FragmentCompose extends FragmentEx {
});
}
@Override
public void onPause() {
onAction(R.id.action_save);
super.onPause();
}
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
inflater.inflate(R.menu.menu_compose, menu);
@ -789,7 +795,7 @@ public class FragmentCompose extends FragmentEx {
getFragmentManager().popBackStack();
Toast.makeText(getContext(), R.string.title_draft_trashed, Toast.LENGTH_LONG).show();
} else if (action == R.id.action_save)
Snackbar.make(view, R.string.title_draft_saved, Snackbar.LENGTH_LONG).show();
Toast.makeText(getContext(), R.string.title_draft_saved, Toast.LENGTH_LONG).show();
else if (action == R.id.action_send) {
getFragmentManager().popBackStack();
Toast.makeText(getContext(), R.string.title_queued, Toast.LENGTH_LONG).show();