Loading k9mail/src/main/java/com/fsck/k9/activity/MessageCompose.java +290 −318 File changed.Preview size limit exceeded, changes collapsed. Show changes k9mail/src/main/java/com/fsck/k9/activity/compose/AttachmentPresenter.java +5 −5 Original line number Diff line number Diff line Loading @@ -32,8 +32,8 @@ public class AttachmentPresenter { private static final String LOADER_ARG_ATTACHMENT = "attachment"; private static final int LOADER_ID_MASK = 1 << 6; public static final int MAX_TOTAL_LOADERS = LOADER_ID_MASK -1; public static final int REQUEST_CODE_ATTACHMENT_URI = 1; private static final int MAX_TOTAL_LOADERS = LOADER_ID_MASK -1; private static final int REQUEST_CODE_ATTACHMENT_URI = 1; // injected state Loading Loading @@ -126,7 +126,7 @@ public class AttachmentPresenter { addAttachment(uri, null); } public void addAttachment(AttachmentViewInfo attachmentViewInfo) { private void addAttachment(AttachmentViewInfo attachmentViewInfo) { if (attachments.containsKey(attachmentViewInfo.internalUri)) { throw new IllegalStateException("Received the same attachmentViewInfo twice!"); } Loading Loading @@ -286,7 +286,7 @@ public class AttachmentPresenter { }); } void performStalledAction() { private void performStalledAction() { attachmentMvpView.dismissWaitingForAttachmentDialog(); WaitingAction waitingFor = actionToPerformAfterWaiting; Loading @@ -305,7 +305,7 @@ public class AttachmentPresenter { } @TargetApi(Build.VERSION_CODES.JELLY_BEAN) void addAttachmentsFromResultIntent(Intent data) { private void addAttachmentsFromResultIntent(Intent data) { // TODO draftNeedsSaving = true if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { ClipData clipData = data.getClipData(); Loading k9mail/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.java +23 −23 Original line number Diff line number Diff line Loading @@ -104,7 +104,7 @@ public class RecipientPresenter implements PermissionPingCallback { return recipientMvpView.getBccAddresses(); } public List<Recipient> getAllRecipients() { private List<Recipient> getAllRecipients() { ArrayList<Recipient> result = new ArrayList<>(); result.addAll(recipientMvpView.getToRecipients()); Loading Loading @@ -216,11 +216,11 @@ public class RecipientPresenter implements PermissionPingCallback { cryptoEnablePgpInline = message.isSet(Flag.X_DRAFT_OPENPGP_INLINE); } void addToAddresses(Address... toAddresses) { private void addToAddresses(Address... toAddresses) { addRecipientsFromAddresses(RecipientType.TO, toAddresses); } void addCcAddresses(Address... ccAddresses) { private void addCcAddresses(Address... ccAddresses) { if (ccAddresses.length > 0) { addRecipientsFromAddresses(RecipientType.CC, ccAddresses); recipientMvpView.setCcVisibility(true); Loading Loading @@ -299,19 +299,19 @@ public class RecipientPresenter implements PermissionPingCallback { return result.toArray(new Address[result.size()]); } public void onClickToLabel() { void onClickToLabel() { recipientMvpView.requestFocusOnToField(); } public void onClickCcLabel() { void onClickCcLabel() { recipientMvpView.requestFocusOnCcField(); } public void onClickBccLabel() { void onClickBccLabel() { recipientMvpView.requestFocusOnBccField(); } public void onClickRecipientExpander() { void onClickRecipientExpander() { recipientMvpView.setCcVisibility(true); recipientMvpView.setBccVisibility(true); updateRecipientExpanderVisibility(); Loading Loading @@ -383,47 +383,47 @@ public class RecipientPresenter implements PermissionPingCallback { } @SuppressWarnings("UnusedParameters") public void onToTokenAdded(Recipient recipient) { void onToTokenAdded(Recipient recipient) { updateCryptoStatus(); } @SuppressWarnings("UnusedParameters") public void onToTokenRemoved(Recipient recipient) { void onToTokenRemoved(Recipient recipient) { updateCryptoStatus(); } @SuppressWarnings("UnusedParameters") public void onToTokenChanged(Recipient recipient) { void onToTokenChanged(Recipient recipient) { updateCryptoStatus(); } @SuppressWarnings("UnusedParameters") public void onCcTokenAdded(Recipient recipient) { void onCcTokenAdded(Recipient recipient) { updateCryptoStatus(); } @SuppressWarnings("UnusedParameters") public void onCcTokenRemoved(Recipient recipient) { void onCcTokenRemoved(Recipient recipient) { updateCryptoStatus(); } @SuppressWarnings("UnusedParameters") public void onCcTokenChanged(Recipient recipient) { void onCcTokenChanged(Recipient recipient) { updateCryptoStatus(); } @SuppressWarnings("UnusedParameters") public void onBccTokenAdded(Recipient recipient) { void onBccTokenAdded(Recipient recipient) { updateCryptoStatus(); } @SuppressWarnings("UnusedParameters") public void onBccTokenRemoved(Recipient recipient) { void onBccTokenRemoved(Recipient recipient) { updateCryptoStatus(); } @SuppressWarnings("UnusedParameters") public void onBccTokenChanged(Recipient recipient) { void onBccTokenChanged(Recipient recipient) { updateCryptoStatus(); } Loading Loading @@ -469,15 +469,15 @@ public class RecipientPresenter implements PermissionPingCallback { }.startLoading(); } public void onToFocused() { void onToFocused() { lastFocusedType = RecipientType.TO; } public void onCcFocused() { void onCcFocused() { lastFocusedType = RecipientType.CC; } public void onBccFocused() { void onBccFocused() { lastFocusedType = RecipientType.BCC; } Loading Loading @@ -539,7 +539,7 @@ public class RecipientPresenter implements PermissionPingCallback { } } public void onClickCryptoStatus() { void onClickCryptoStatus() { switch (cryptoProviderState) { case UNCONFIGURED: Log.e(K9.LOG_TAG, "click on crypto status while unconfigured - this should not really happen?!"); Loading @@ -566,7 +566,7 @@ public class RecipientPresenter implements PermissionPingCallback { * * @return True, if the device supports picking contacts. False, otherwise. */ public boolean hasContactPicker() { private boolean hasContactPicker() { if (hasContactPicker == null) { Contacts contacts = Contacts.getInstance(context); Loading Loading @@ -594,7 +594,7 @@ public class RecipientPresenter implements PermissionPingCallback { } } public void showPgpAttachError(AttachErrorState attachErrorState) { void showPgpAttachError(AttachErrorState attachErrorState) { switch (attachErrorState) { case IS_INLINE: recipientMvpView.showErrorInlineAttach(); Loading Loading @@ -702,7 +702,7 @@ public class RecipientPresenter implements PermissionPingCallback { openPgpServiceConnection = null; } public OpenPgpApi getOpenPgpApi() { private OpenPgpApi getOpenPgpApi() { if (openPgpServiceConnection == null || !openPgpServiceConnection.isBound()) { Log.e(K9.LOG_TAG, "obtained openpgpapi object, but service is not bound! inconsistent state?"); } Loading k9mail/src/main/java/com/fsck/k9/ui/compose/QuotedMessagePresenter.java +3 −3 Original line number Diff line number Diff line Loading @@ -353,19 +353,19 @@ public class QuotedMessagePresenter { } } public void onClickShowQuotedText() { void onClickShowQuotedText() { showOrHideQuotedText(QuotedTextMode.SHOW); messageCompose.updateMessageFormat(); messageCompose.saveDraftEventually(); } public void onClickDeleteQuotedText() { void onClickDeleteQuotedText() { showOrHideQuotedText(QuotedTextMode.HIDE); messageCompose.updateMessageFormat(); messageCompose.saveDraftEventually(); } public void onClickEditQuotedText() { void onClickEditQuotedText() { forcePlainText = true; messageCompose.loadQuotedTextForEdit(); } Loading Loading
k9mail/src/main/java/com/fsck/k9/activity/MessageCompose.java +290 −318 File changed.Preview size limit exceeded, changes collapsed. Show changes
k9mail/src/main/java/com/fsck/k9/activity/compose/AttachmentPresenter.java +5 −5 Original line number Diff line number Diff line Loading @@ -32,8 +32,8 @@ public class AttachmentPresenter { private static final String LOADER_ARG_ATTACHMENT = "attachment"; private static final int LOADER_ID_MASK = 1 << 6; public static final int MAX_TOTAL_LOADERS = LOADER_ID_MASK -1; public static final int REQUEST_CODE_ATTACHMENT_URI = 1; private static final int MAX_TOTAL_LOADERS = LOADER_ID_MASK -1; private static final int REQUEST_CODE_ATTACHMENT_URI = 1; // injected state Loading Loading @@ -126,7 +126,7 @@ public class AttachmentPresenter { addAttachment(uri, null); } public void addAttachment(AttachmentViewInfo attachmentViewInfo) { private void addAttachment(AttachmentViewInfo attachmentViewInfo) { if (attachments.containsKey(attachmentViewInfo.internalUri)) { throw new IllegalStateException("Received the same attachmentViewInfo twice!"); } Loading Loading @@ -286,7 +286,7 @@ public class AttachmentPresenter { }); } void performStalledAction() { private void performStalledAction() { attachmentMvpView.dismissWaitingForAttachmentDialog(); WaitingAction waitingFor = actionToPerformAfterWaiting; Loading @@ -305,7 +305,7 @@ public class AttachmentPresenter { } @TargetApi(Build.VERSION_CODES.JELLY_BEAN) void addAttachmentsFromResultIntent(Intent data) { private void addAttachmentsFromResultIntent(Intent data) { // TODO draftNeedsSaving = true if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { ClipData clipData = data.getClipData(); Loading
k9mail/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.java +23 −23 Original line number Diff line number Diff line Loading @@ -104,7 +104,7 @@ public class RecipientPresenter implements PermissionPingCallback { return recipientMvpView.getBccAddresses(); } public List<Recipient> getAllRecipients() { private List<Recipient> getAllRecipients() { ArrayList<Recipient> result = new ArrayList<>(); result.addAll(recipientMvpView.getToRecipients()); Loading Loading @@ -216,11 +216,11 @@ public class RecipientPresenter implements PermissionPingCallback { cryptoEnablePgpInline = message.isSet(Flag.X_DRAFT_OPENPGP_INLINE); } void addToAddresses(Address... toAddresses) { private void addToAddresses(Address... toAddresses) { addRecipientsFromAddresses(RecipientType.TO, toAddresses); } void addCcAddresses(Address... ccAddresses) { private void addCcAddresses(Address... ccAddresses) { if (ccAddresses.length > 0) { addRecipientsFromAddresses(RecipientType.CC, ccAddresses); recipientMvpView.setCcVisibility(true); Loading Loading @@ -299,19 +299,19 @@ public class RecipientPresenter implements PermissionPingCallback { return result.toArray(new Address[result.size()]); } public void onClickToLabel() { void onClickToLabel() { recipientMvpView.requestFocusOnToField(); } public void onClickCcLabel() { void onClickCcLabel() { recipientMvpView.requestFocusOnCcField(); } public void onClickBccLabel() { void onClickBccLabel() { recipientMvpView.requestFocusOnBccField(); } public void onClickRecipientExpander() { void onClickRecipientExpander() { recipientMvpView.setCcVisibility(true); recipientMvpView.setBccVisibility(true); updateRecipientExpanderVisibility(); Loading Loading @@ -383,47 +383,47 @@ public class RecipientPresenter implements PermissionPingCallback { } @SuppressWarnings("UnusedParameters") public void onToTokenAdded(Recipient recipient) { void onToTokenAdded(Recipient recipient) { updateCryptoStatus(); } @SuppressWarnings("UnusedParameters") public void onToTokenRemoved(Recipient recipient) { void onToTokenRemoved(Recipient recipient) { updateCryptoStatus(); } @SuppressWarnings("UnusedParameters") public void onToTokenChanged(Recipient recipient) { void onToTokenChanged(Recipient recipient) { updateCryptoStatus(); } @SuppressWarnings("UnusedParameters") public void onCcTokenAdded(Recipient recipient) { void onCcTokenAdded(Recipient recipient) { updateCryptoStatus(); } @SuppressWarnings("UnusedParameters") public void onCcTokenRemoved(Recipient recipient) { void onCcTokenRemoved(Recipient recipient) { updateCryptoStatus(); } @SuppressWarnings("UnusedParameters") public void onCcTokenChanged(Recipient recipient) { void onCcTokenChanged(Recipient recipient) { updateCryptoStatus(); } @SuppressWarnings("UnusedParameters") public void onBccTokenAdded(Recipient recipient) { void onBccTokenAdded(Recipient recipient) { updateCryptoStatus(); } @SuppressWarnings("UnusedParameters") public void onBccTokenRemoved(Recipient recipient) { void onBccTokenRemoved(Recipient recipient) { updateCryptoStatus(); } @SuppressWarnings("UnusedParameters") public void onBccTokenChanged(Recipient recipient) { void onBccTokenChanged(Recipient recipient) { updateCryptoStatus(); } Loading Loading @@ -469,15 +469,15 @@ public class RecipientPresenter implements PermissionPingCallback { }.startLoading(); } public void onToFocused() { void onToFocused() { lastFocusedType = RecipientType.TO; } public void onCcFocused() { void onCcFocused() { lastFocusedType = RecipientType.CC; } public void onBccFocused() { void onBccFocused() { lastFocusedType = RecipientType.BCC; } Loading Loading @@ -539,7 +539,7 @@ public class RecipientPresenter implements PermissionPingCallback { } } public void onClickCryptoStatus() { void onClickCryptoStatus() { switch (cryptoProviderState) { case UNCONFIGURED: Log.e(K9.LOG_TAG, "click on crypto status while unconfigured - this should not really happen?!"); Loading @@ -566,7 +566,7 @@ public class RecipientPresenter implements PermissionPingCallback { * * @return True, if the device supports picking contacts. False, otherwise. */ public boolean hasContactPicker() { private boolean hasContactPicker() { if (hasContactPicker == null) { Contacts contacts = Contacts.getInstance(context); Loading Loading @@ -594,7 +594,7 @@ public class RecipientPresenter implements PermissionPingCallback { } } public void showPgpAttachError(AttachErrorState attachErrorState) { void showPgpAttachError(AttachErrorState attachErrorState) { switch (attachErrorState) { case IS_INLINE: recipientMvpView.showErrorInlineAttach(); Loading Loading @@ -702,7 +702,7 @@ public class RecipientPresenter implements PermissionPingCallback { openPgpServiceConnection = null; } public OpenPgpApi getOpenPgpApi() { private OpenPgpApi getOpenPgpApi() { if (openPgpServiceConnection == null || !openPgpServiceConnection.isBound()) { Log.e(K9.LOG_TAG, "obtained openpgpapi object, but service is not bound! inconsistent state?"); } Loading
k9mail/src/main/java/com/fsck/k9/ui/compose/QuotedMessagePresenter.java +3 −3 Original line number Diff line number Diff line Loading @@ -353,19 +353,19 @@ public class QuotedMessagePresenter { } } public void onClickShowQuotedText() { void onClickShowQuotedText() { showOrHideQuotedText(QuotedTextMode.SHOW); messageCompose.updateMessageFormat(); messageCompose.saveDraftEventually(); } public void onClickDeleteQuotedText() { void onClickDeleteQuotedText() { showOrHideQuotedText(QuotedTextMode.HIDE); messageCompose.updateMessageFormat(); messageCompose.saveDraftEventually(); } public void onClickEditQuotedText() { void onClickEditQuotedText() { forcePlainText = true; messageCompose.loadQuotedTextForEdit(); } Loading