Loading k9mail/src/main/java/com/fsck/k9/activity/compose/RecipientMvpView.java +12 −0 Original line number Diff line number Diff line Loading @@ -258,6 +258,18 @@ public class RecipientMvpView implements OnFocusChangeListener, OnClickListener return bccView.hasUncompletedText(); } public boolean recipientToTryPerformCompletion() { return toView.tryPerformCompletion(); } public boolean recipientCcTryPerformCompletion() { return ccView.tryPerformCompletion(); } public boolean recipientBccTryPerformCompletion() { return bccView.tryPerformCompletion(); } public void showToUncompletedError() { toView.setError(toView.getContext().getString(R.string.compose_error_incomplete_recipient)); } Loading k9mail/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.java +7 −0 Original line number Diff line number Diff line Loading @@ -116,6 +116,13 @@ public class RecipientPresenter implements PermissionPingCallback { } public boolean checkRecipientsOkForSending() { boolean performedAnyCompletion = recipientMvpView.recipientToTryPerformCompletion() || recipientMvpView.recipientCcTryPerformCompletion() || recipientMvpView.recipientBccTryPerformCompletion(); if (performedAnyCompletion) { return true; } if (recipientMvpView.recipientToHasUncompletedText()) { recipientMvpView.showToUncompletedError(); return true; Loading k9mail/src/main/java/com/fsck/k9/view/RecipientSelectView.java +15 −0 Original line number Diff line number Diff line Loading @@ -370,6 +370,21 @@ public class RecipientSelectView extends TokenCompleteTextView<Recipient> implem } } public boolean tryPerformCompletion() { if (!hasUncompletedText()) { return false; } int previousNumRecipients = getTokenCount(); performCompletion(); int numRecipients = getTokenCount(); return previousNumRecipients != numRecipients; } private int getTokenCount() { return getObjects().size(); } public boolean hasUncompletedText() { String currentCompletionText = currentCompletionText(); return !TextUtils.isEmpty(currentCompletionText) && !isPlaceholderText(currentCompletionText); Loading Loading
k9mail/src/main/java/com/fsck/k9/activity/compose/RecipientMvpView.java +12 −0 Original line number Diff line number Diff line Loading @@ -258,6 +258,18 @@ public class RecipientMvpView implements OnFocusChangeListener, OnClickListener return bccView.hasUncompletedText(); } public boolean recipientToTryPerformCompletion() { return toView.tryPerformCompletion(); } public boolean recipientCcTryPerformCompletion() { return ccView.tryPerformCompletion(); } public boolean recipientBccTryPerformCompletion() { return bccView.tryPerformCompletion(); } public void showToUncompletedError() { toView.setError(toView.getContext().getString(R.string.compose_error_incomplete_recipient)); } Loading
k9mail/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.java +7 −0 Original line number Diff line number Diff line Loading @@ -116,6 +116,13 @@ public class RecipientPresenter implements PermissionPingCallback { } public boolean checkRecipientsOkForSending() { boolean performedAnyCompletion = recipientMvpView.recipientToTryPerformCompletion() || recipientMvpView.recipientCcTryPerformCompletion() || recipientMvpView.recipientBccTryPerformCompletion(); if (performedAnyCompletion) { return true; } if (recipientMvpView.recipientToHasUncompletedText()) { recipientMvpView.showToUncompletedError(); return true; Loading
k9mail/src/main/java/com/fsck/k9/view/RecipientSelectView.java +15 −0 Original line number Diff line number Diff line Loading @@ -370,6 +370,21 @@ public class RecipientSelectView extends TokenCompleteTextView<Recipient> implem } } public boolean tryPerformCompletion() { if (!hasUncompletedText()) { return false; } int previousNumRecipients = getTokenCount(); performCompletion(); int numRecipients = getTokenCount(); return previousNumRecipients != numRecipients; } private int getTokenCount() { return getObjects().size(); } public boolean hasUncompletedText() { String currentCompletionText = currentCompletionText(); return !TextUtils.isEmpty(currentCompletionText) && !isPlaceholderText(currentCompletionText); Loading