mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-07 01:15:33 +00:00
fix(android): Pass language ID to ConformDialogFragment
When cancelling the Android system notifications about lexical model update being available, the notification would still remain. This passes the language ID so the dialog can be cancelled.
This commit is contained in:
parent
cc25b538cc
commit
57dcdf3b2b
2 changed files with 3 additions and 2 deletions
|
|
@ -49,13 +49,14 @@ public class ConfirmDialogFragment extends DialogFragment {
|
|||
}
|
||||
|
||||
public static ConfirmDialogFragment newInstanceForLexicalModel(DialogType dialogType, String title, String message,
|
||||
String aModelId,
|
||||
String aLangId, String aModelId,
|
||||
ArrayList<CloudApiTypes.CloudApiParam> aQueries) {
|
||||
ConfirmDialogFragment frag = new ConfirmDialogFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putSerializable(ARG_DIALOG_TYPE, dialogType);
|
||||
args.putString(ARG_TITLE, title);
|
||||
args.putString(ARG_MESSAGE, message);
|
||||
args.putString(ARG_LANG_ID_KEY, aLangId);
|
||||
args.putString(ARG_MODEL_ID_KEY, aModelId);
|
||||
args.putSerializable(ARG_DOWNLOAD_QUERIES_KEY,aQueries);
|
||||
frag.setArguments(args);
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ public class KMKeyboardDownloaderActivity extends AppCompatActivity {
|
|||
title = String.format("%s: %s", langName, modelName);
|
||||
dialog = ConfirmDialogFragment.newInstanceForLexicalModel(
|
||||
DIALOG_TYPE_DOWNLOAD_MODEL, title, getString(R.string.confirm_download_model),
|
||||
modelID,
|
||||
langID, modelID,
|
||||
prepareCloudApiParamsForLexicalModelDownload());
|
||||
} else {
|
||||
dialog = ConfirmDialogFragment.newInstanceForKeyboard(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue