mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-25 09:08:49 -05:00
Split out a "clear the current message view" method
This commit is contained in:
parent
a3793ac651
commit
98f3909ecc
@ -583,14 +583,7 @@ public class MessageView extends K9Activity implements OnClickListener {
|
|||||||
if (K9.DEBUG)
|
if (K9.DEBUG)
|
||||||
Log.d(K9.LOG_TAG, "MessageView displaying message " + mMessageReference);
|
Log.d(K9.LOG_TAG, "MessageView displaying message " + mMessageReference);
|
||||||
mAccount = Preferences.getPreferences(this).getAccount(mMessageReference.accountUuid);
|
mAccount = Preferences.getPreferences(this).getAccount(mMessageReference.accountUuid);
|
||||||
mTopView.setVisibility(View.GONE);
|
clearMessageDisplay();
|
||||||
mTopView.scrollTo(0, 0);
|
|
||||||
mMessageContentView.scrollTo(0, 0);
|
|
||||||
mHeaderContainer.setVisibility(View.GONE);
|
|
||||||
|
|
||||||
mMessageContentView.clearView();
|
|
||||||
setLoadPictures(false);
|
|
||||||
mAttachments.removeAllViews();
|
|
||||||
findSurroundingMessagesUid();
|
findSurroundingMessagesUid();
|
||||||
// start with fresh, empty PGP data
|
// start with fresh, empty PGP data
|
||||||
mCryptoView.setCryptoData(null);
|
mCryptoView.setCryptoData(null);
|
||||||
@ -604,6 +597,17 @@ public class MessageView extends K9Activity implements OnClickListener {
|
|||||||
setupDisplayMessageButtons();
|
setupDisplayMessageButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void clearMessageDisplay() {
|
||||||
|
mTopView.setVisibility(View.GONE);
|
||||||
|
mTopView.scrollTo(0, 0);
|
||||||
|
mMessageContentView.scrollTo(0, 0);
|
||||||
|
mHeaderContainer.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
mMessageContentView.clearView();
|
||||||
|
setLoadPictures(false);
|
||||||
|
mAttachments.removeAllViews();
|
||||||
|
}
|
||||||
|
|
||||||
private void setupDisplayMessageButtons() {
|
private void setupDisplayMessageButtons() {
|
||||||
mDelete.setEnabled(true);
|
mDelete.setEnabled(true);
|
||||||
next.setEnabled(mNextMessage != null);
|
next.setEnabled(mNextMessage != null);
|
||||||
|
Loading…
Reference in New Issue
Block a user