Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d51b90f3 authored by cketti's avatar cketti Committed by GitHub
Browse files

Merge pull request #2059 from philipwhiuk/autocompleteFix

Autocomplete fix v2
parents dbb5180e 02eb84a1
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -115,12 +115,9 @@ public class RecipientPresenter implements PermissionPingCallback {
    }

    public boolean checkRecipientsOkForSending() {
        boolean performedAnyCompletion = recipientMvpView.recipientToTryPerformCompletion() ||
                recipientMvpView.recipientCcTryPerformCompletion() ||
        recipientMvpView.recipientToTryPerformCompletion();
        recipientMvpView.recipientCcTryPerformCompletion();
        recipientMvpView.recipientBccTryPerformCompletion();
        if (performedAnyCompletion) {
            return true;
        }

        if (recipientMvpView.recipientToHasUncompletedText()) {
            recipientMvpView.showToUncompletedError();
+3 −8
Original line number Diff line number Diff line
@@ -229,14 +229,9 @@ public class RecipientSelectView extends TokenCompleteTextView<Recipient> implem
    @Override
    public void performCompletion() {
        if (getListSelection() == ListView.INVALID_POSITION && enoughToFilter()) {
            Object bestGuess;
            if (getAdapter().getCount() > 0) {
                bestGuess = getAdapter().getItem(0);
            } else {
                bestGuess = defaultObject(currentCompletionText());
            }
            if (bestGuess != null) {
                replaceText(convertSelectionToString(bestGuess));
            Object recipientText = defaultObject(currentCompletionText());
            if (recipientText != null) {
                replaceText(convertSelectionToString(recipientText));
            }
        } else {
            super.performCompletion();