Skip to content

Commit

Permalink
Sentence sources will ow set source
Browse files Browse the repository at this point in the history
  • Loading branch information
arianneorpilla committed May 17, 2023
1 parent c07aabd commit 9424ad0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ class ImmersionKitEnhancement extends Enhancement {

ImmersionKitResult firstResult = selection.removeAt(0);
creatorModel.setSentenceAndCloze(firstResult.selection);
creatorModel.getFieldController(ContextField.instance).text =
firstResult.source;
for (ImmersionKitResult result in selection) {
creatorModel.appendSentenceAndCloze(result.text);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ class MassifExampleSentencesEnhancement extends Enhancement {

MassifResult firstResult = selection.removeAt(0);
creatorModel.setSentenceAndCloze(firstResult.selection);
creatorModel.getFieldController(ContextField.instance).text =
firstResult.source;
for (MassifResult result in selection) {
creatorModel.appendSentenceAndCloze(result.text);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class TatoebaExampleSentencesEnhancement extends Enhancement {
String firstResult = selection.removeAt(0);
creatorModel
.setSentenceAndCloze(JidoujishoTextSelection(text: firstResult));
creatorModel.getFieldController(ContextField.instance).clear();
for (String result in selection) {
creatorModel.appendSentenceAndCloze(result);
}
Expand Down

0 comments on commit 9424ad0

Please sign in to comment.