1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-26 09:38:52 -05:00

Fixed issue 663: The source message of the reply was re-loaded every time the screen is rotated populating all fields on top of the framework handling the screen rotation

This commit is contained in:
Bao-Long Nguyen-Trong 2009-10-18 03:22:17 +00:00
parent 96388531bd
commit 4e2ba837aa

View File

@ -258,6 +258,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
context.startActivity(i);
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -268,7 +269,6 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
mAddressAdapter = new EmailAddressAdapter(this);
mAddressValidator = new EmailAddressValidator();
mFromView = (TextView)findViewById(R.id.from);
mToView = (MultiAutoCompleteTextView)findViewById(R.id.to);
mCcView = (MultiAutoCompleteTextView)findViewById(R.id.cc);
@ -278,7 +278,6 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
EditText upperSignature = (EditText)findViewById(R.id.upper_signature);
EditText lowerSignature = (EditText)findViewById(R.id.lower_signature);
mMessageContentView = (EditText)findViewById(R.id.message_content);
mAttachments = (LinearLayout)findViewById(R.id.attachments);
mQuotedTextBar = findViewById(R.id.quoted_text_bar);
@ -497,6 +496,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
}
mSignatureView.addTextChangedListener(sigwatcher);
if (!mSourceMessageProcessed) {
updateFrom();
updateSignature();
@ -510,10 +510,6 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
MessagingController.getInstance(getApplication()).addListener(mListener);
MessagingController.getInstance(getApplication()).loadMessageForView( mAccount, mFolder, mSourceMessageUid, null);
}
if (ACTION_REPLY.equals(action) || ACTION_REPLY_ALL.equals(action) || ACTION_EDIT_DRAFT.equals(action)) {
//change focus to message body.
mMessageContentView.requestFocus();
}
if (!ACTION_EDIT_DRAFT.equals(action)) {
String bccAddress = mAccount.getAlwaysBcc();
@ -534,6 +530,12 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
updateTitle();
}
if (ACTION_REPLY.equals(action) || ACTION_REPLY_ALL.equals(action) || ACTION_EDIT_DRAFT.equals(action)) {
//change focus to message body.
mMessageContentView.requestFocus();
}
}
public void onResume() {
super.onResume();
MessagingController.getInstance(getApplication()).addListener(mListener);