mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-06 08:55:34 +00:00
Add two more fixes
* Fix determination of custom keyboard from package * Add Toast notification when re-installing a lexical model.
This commit is contained in:
parent
a19db98e78
commit
56982bde4e
2 changed files with 5 additions and 2 deletions
|
|
@ -327,7 +327,7 @@ public final class KeyboardPickerActivity extends AppCompatActivity implements O
|
|||
protected static boolean hasKeyboardFromPackage() {
|
||||
for(HashMap<String, String> kbInfo: keyboardsList) {
|
||||
String customKeyboard = MapCompat.getOrDefault(kbInfo, KMManager.KMKey_CustomKeyboard, "N");
|
||||
if (!customKeyboard.equalsIgnoreCase("Y")) {
|
||||
if (customKeyboard.equalsIgnoreCase("Y")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -463,7 +463,10 @@ public final class ModelPickerActivity extends AppCompatActivity {
|
|||
// we only need to add the model to the list of installed models
|
||||
// Add help link
|
||||
modelInfo.put(KMManager.KMKey_CustomHelpLink, "");
|
||||
KMManager.addLexicalModel(context, modelInfo);
|
||||
boolean result = KMManager.addLexicalModel(context, modelInfo);
|
||||
if (result) {
|
||||
Toast.makeText(context, "Model installed", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
} else {
|
||||
// Model isn't installed so prompt to download it
|
||||
Bundle args = new Bundle();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue