Skip to content

Commit

Permalink
Fixed Bug ankidroid#8973
Browse files Browse the repository at this point in the history
  • Loading branch information
prateek-singh-3212 committed May 31, 2021
1 parent cf53ad4 commit 114a99e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
31 changes: 0 additions & 31 deletions AnkiDroid/src/main/java/com/ichi2/anki/NoteEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -1061,20 +1061,6 @@ public void onBackPressed() {
}


@Override
protected void onPause() {
dismissAllDialogFragments(); //remove the "field language" as it can't be reshown without a field reference
super.onPause();
}


@Override
protected void onResume() {
dismissAllDialogFragments(); // dismiss "tags" as it may have been attached after onPause is called
super.onResume();
}


@Override
protected void onDestroy() {
super.onDestroy();
Expand Down Expand Up @@ -2313,12 +2299,6 @@ public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
menu.add(Menu.NONE, mClozeMenuId, 0, R.string.multimedia_editor_popup_cloze);
}

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
// This should be after "Paste as Plain Text"
menu.add(Menu.NONE, mSetLanguageId, 99, R.string.note_editor_set_field_language);
}


return initialSize != menu.size();
}

Expand All @@ -2330,23 +2310,12 @@ public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
convertSelectedTextToCloze(mTextBox, AddClozeType.INCREMENT_NUMBER);
mode.finish();
return true;
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && itemId == mSetLanguageId) {
displaySelectInputLanguage();
mode.finish();
return true;
} else {
return false;
}
}


@RequiresApi(Build.VERSION_CODES.N)
private void displaySelectInputLanguage() {
DialogFragment dialogFragment = LocaleSelectionDialog.newInstance(this);
showDialogFragment(dialogFragment);
}


@Override
public void onDestroyActionMode(ActionMode mode) {
// Left empty on purpose
Expand Down
1 change: 0 additions & 1 deletion AnkiDroid/src/main/res/values/02-strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
<string name="note_editor_no_cards_created">No cards created. Please fill in more fields</string>
<string name="note_editor_no_first_field">The first field is empty</string>
<string name="note_editor_no_cloze_delations">This note type must contain cloze deletions</string>
<string name="note_editor_set_field_language">Set field language</string>
<string name="note_editor_no_cards_created_all_fields">The current note type did not produce any cards.\nPlease choose another note type, or click ‘Cards’ and add a field substitution</string>
<string name="note_editor_insert_cloze_no_cloze_note_type">Cloze deletions will only work on a Cloze note type</string>
<string name="saving_facts">Saving note</string>
Expand Down

0 comments on commit 114a99e

Please sign in to comment.