Code style fixes
This commit is contained in:
parent
9180c2c1e3
commit
a357963d32
4 changed files with 68 additions and 69 deletions
|
@ -136,10 +136,10 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
|||
public static final int MSG_SAVED_DRAFT = 4;
|
||||
private static final int MSG_DISCARDED_DRAFT = 5;
|
||||
|
||||
private static final int REQUEST_MASK_RECIPIENT_PRESENTER = (1<<8);
|
||||
private static final int REQUEST_MASK_LOADER_HELPER = (1<<9);
|
||||
private static final int REQUEST_MASK_ATTACHMENT_PRESENTER = (1<<10);
|
||||
private static final int REQUEST_MASK_MESSAGE_BUILDER = (1<<11);
|
||||
private static final int REQUEST_MASK_RECIPIENT_PRESENTER = (1 << 8);
|
||||
private static final int REQUEST_MASK_LOADER_HELPER = (1 << 9);
|
||||
private static final int REQUEST_MASK_ATTACHMENT_PRESENTER = (1 << 10);
|
||||
private static final int REQUEST_MASK_MESSAGE_BUILDER = (1 << 11);
|
||||
|
||||
/**
|
||||
* Regular expression to remove the first localized "Re:" prefix in subjects.
|
||||
|
@ -271,17 +271,17 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
|||
subjectView = (EditText) findViewById(R.id.subject);
|
||||
subjectView.getInputExtras(true).putBoolean("allowEmoji", true);
|
||||
|
||||
EolConvertingEditText upperSignature = (EolConvertingEditText)findViewById(R.id.upper_signature);
|
||||
EolConvertingEditText lowerSignature = (EolConvertingEditText)findViewById(R.id.lower_signature);
|
||||
EolConvertingEditText upperSignature = (EolConvertingEditText) findViewById(R.id.upper_signature);
|
||||
EolConvertingEditText lowerSignature = (EolConvertingEditText) findViewById(R.id.lower_signature);
|
||||
|
||||
QuotedMessageMvpView quotedMessageMvpView = new QuotedMessageMvpView(this);
|
||||
quotedMessagePresenter = new QuotedMessagePresenter(this, quotedMessageMvpView, account);
|
||||
attachmentPresenter = new AttachmentPresenter(getApplicationContext(), attachmentMvpView, getLoaderManager());
|
||||
|
||||
messageContentView = (EolConvertingEditText)findViewById(R.id.message_content);
|
||||
messageContentView = (EolConvertingEditText) findViewById(R.id.message_content);
|
||||
messageContentView.getInputExtras(true).putBoolean("allowEmoji", true);
|
||||
|
||||
attachmentsView = (LinearLayout)findViewById(R.id.attachments);
|
||||
attachmentsView = (LinearLayout) findViewById(R.id.attachments);
|
||||
|
||||
TextWatcher draftNeedsChangingTextWatcher = new SimpleTextWatcher() {
|
||||
@Override
|
||||
|
@ -429,9 +429,10 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
|||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
||||
if (recipientPresenter != null)
|
||||
if (recipientPresenter != null) {
|
||||
recipientPresenter.onActivityDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle external intents that trigger the message compose activity.
|
||||
|
@ -595,7 +596,7 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
|||
attachmentPresenter.onRestoreInstanceState(savedInstanceState);
|
||||
|
||||
draftId = savedInstanceState.getLong(STATE_KEY_DRAFT_ID);
|
||||
identity = (Identity)savedInstanceState.getSerializable(STATE_IDENTITY);
|
||||
identity = (Identity) savedInstanceState.getSerializable(STATE_IDENTITY);
|
||||
identityChanged = savedInstanceState.getBoolean(STATE_IDENTITY_CHANGED);
|
||||
repliedToMessageId = savedInstanceState.getString(STATE_IN_REPLY_TO);
|
||||
referencedMessageIds = savedInstanceState.getString(STATE_REFERENCES);
|
||||
|
@ -618,7 +619,7 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
|||
recipientPresenter.updateCryptoStatus();
|
||||
ComposeCryptoStatus cryptoStatus = recipientPresenter.getCurrentCryptoStatus();
|
||||
// TODO encrypt drafts for storage
|
||||
if(!isDraft && cryptoStatus.shouldUsePgpMessageBuilder()) {
|
||||
if (!isDraft && cryptoStatus.shouldUsePgpMessageBuilder()) {
|
||||
SendErrorState maybeSendErrorState = cryptoStatus.getSendErrorStateOrNull();
|
||||
if (maybeSendErrorState != null) {
|
||||
recipientPresenter.showPgpSendError(maybeSendErrorState);
|
||||
|
@ -813,8 +814,7 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
|||
|
||||
if (previousDraftId != INVALID_DRAFT_ID) {
|
||||
if (K9.DEBUG) {
|
||||
Log.v(K9.LOG_TAG, "Account switch, deleting draft from previous account: "
|
||||
+ previousDraftId);
|
||||
Log.v(K9.LOG_TAG, "Account switch, deleting draft from previous account: " + previousDraftId);
|
||||
}
|
||||
MessagingController.getInstance(getApplication()).deleteDraft(previousAccount,
|
||||
previousDraftId);
|
||||
|
@ -861,7 +861,7 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
|||
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
switch(v.getId()) {
|
||||
switch (v.getId()) {
|
||||
case R.id.message_content:
|
||||
case R.id.subject:
|
||||
if (hasFocus) {
|
||||
|
@ -1115,7 +1115,7 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
|||
}
|
||||
}
|
||||
} catch (MessagingException me) {
|
||||
/**
|
||||
/*
|
||||
* Let the user continue composing their message even if we have a problem processing
|
||||
* the source message. Log it as an error, though.
|
||||
*/
|
||||
|
@ -1576,7 +1576,7 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
|||
};
|
||||
|
||||
AttachmentMvpView attachmentMvpView = new AttachmentMvpView() {
|
||||
private HashMap<Uri,View> attachmentViews = new HashMap<>();
|
||||
private HashMap<Uri, View> attachmentViews = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public void showWaitingForAttachmentDialog(WaitingAction waitingAction) {
|
||||
|
@ -1734,5 +1734,4 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
|||
return titleResource;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ public class AttachmentPresenter {
|
|||
|
||||
private static final String LOADER_ARG_ATTACHMENT = "attachment";
|
||||
private static final int LOADER_ID_MASK = 1 << 6;
|
||||
private static final int MAX_TOTAL_LOADERS = LOADER_ID_MASK -1;
|
||||
private static final int MAX_TOTAL_LOADERS = LOADER_ID_MASK - 1;
|
||||
private static final int REQUEST_CODE_ATTACHMENT_URI = 1;
|
||||
|
||||
|
||||
|
@ -113,7 +113,8 @@ public class AttachmentPresenter {
|
|||
}
|
||||
|
||||
public void onClickAddAttachment(RecipientPresenter recipientPresenter) {
|
||||
AttachErrorState maybeAttachErrorState = recipientPresenter.getCurrentCryptoStatus().getAttachErrorStateOrNull();
|
||||
AttachErrorState maybeAttachErrorState =
|
||||
recipientPresenter.getCurrentCryptoStatus().getAttachErrorStateOrNull();
|
||||
if (maybeAttachErrorState != null) {
|
||||
recipientPresenter.showPgpAttachError(maybeAttachErrorState);
|
||||
return;
|
||||
|
|
|
@ -381,5 +381,4 @@ public class QuotedMessagePresenter {
|
|||
public boolean isQuotedTextText() {
|
||||
return quotedTextFormat == SimpleMessageFormat.TEXT;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue