mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-03 09:49:21 +02:00
fix saving drafts
this is an addition to #1192: by calling processComposeControls() twice, in onPause() and on Destroy(), the seccond call gets an empty draft. as onDestroy() is not guarateed to be executed anyway - this was the intent of the move in pr #1192 - we just remove this call and rely on onPause(). see https://developer.android.com/reference/android/app/Activity.html for lifecycles and killable events.
This commit is contained in:
parent
d06235ae85
commit
ac65b77de9
1 changed files with 0 additions and 2 deletions
|
@ -305,7 +305,6 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
// save draft on pause
|
||||
processComposeControls(ACTION_SAVE_DRAFT);
|
||||
MessageNotifierCompat.updateVisibleChat(MessageNotifierCompat.NO_VISIBLE_CHAT_ID);
|
||||
if (isFinishing()) overridePendingTransition(R.anim.fade_scale_in, R.anim.slide_to_right);
|
||||
|
@ -333,7 +332,6 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
processComposeControls(ACTION_SAVE_DRAFT);
|
||||
dcContext.eventCenter.removeObservers(this);
|
||||
super.onDestroy();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue