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

Commit 976d0ce7 authored by Jean Chalard's avatar Jean Chalard
Browse files

Allow multiple shortcuts for a personal dictionary word

Bug: 13869301

Change-Id: I040613bdddc9f18875e29f3382418476262b00ce
parent 820848a0
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -146,7 +146,9 @@ public class UserDictionaryAddWordContents {
        // should not insert, because either A. the word exists with no shortcut, in which
        // case the exact same thing we want to insert is already there, or B. the word
        // exists with at least one shortcut, in which case it has priority on our word.
        if (hasWord(newWord, context)) return UserDictionaryAddWordActivity.CODE_ALREADY_PRESENT;
        if (TextUtils.isEmpty(newShortcut) && hasWord(newWord, context)) {
            return UserDictionaryAddWordActivity.CODE_ALREADY_PRESENT;
        }

        // Disallow duplicates. If the same word with no shortcut is defined, remove it; if
        // the same word with the same shortcut is defined, remove it; but we don't mind if