diff --git a/README.md b/README.md index 414656f4..b1da2bde 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

jidoujisho

A full-featured immersion language learning suite for mobile.

- + latest release @@ -34,7 +34,7 @@ ---

✨ Latest Release: - 2.8.6 + 2.8.7

diff --git a/yuuna/lib/main.dart b/yuuna/lib/main.dart index 2b53adf1..f9ee4db6 100644 --- a/yuuna/lib/main.dart +++ b/yuuna/lib/main.dart @@ -77,7 +77,6 @@ void main() { ); }, (exception, stack) { /// Print error details to the console. - final details = FlutterErrorDetails(exception: exception, stack: stack); /// Log the error. diff --git a/yuuna/lib/src/creator/enhancements/tatoeba_example_sentences_enhancement.dart b/yuuna/lib/src/creator/enhancements/tatoeba_example_sentences_enhancement.dart index 1d4a3732..c6b0dd8f 100644 --- a/yuuna/lib/src/creator/enhancements/tatoeba_example_sentences_enhancement.dart +++ b/yuuna/lib/src/creator/enhancements/tatoeba_example_sentences_enhancement.dart @@ -25,7 +25,7 @@ class TatoebaExampleSentencesEnhancement extends Enhancement { static const String key = 'tatoeba_example_sentences'; /// Used to store results that have already been found at runtime. - final Map> _tatoebaCache = {}; + final Map>> _tatoebaCache = {}; /// Client used to communicate with Tatoeba. final http.Client _client = http.Client(); @@ -84,8 +84,10 @@ class TatoebaExampleSentencesEnhancement extends Enhancement { Language language = appModel.targetLanguage; String langCode = language.threeLetterCode; - if (_tatoebaCache[langCode] != null) { - return _tatoebaCache[langCode]!; + _tatoebaCache[langCode] ??= {}; + + if (_tatoebaCache[langCode]![searchTerm] != null) { + return _tatoebaCache[langCode]![searchTerm]!; } List sentences = []; @@ -98,7 +100,7 @@ class TatoebaExampleSentencesEnhancement extends Enhancement { List>.from(json['results']); sentences = results.map((result) => result['text'].toString()).toList(); - _tatoebaCache[langCode] = sentences; + _tatoebaCache[langCode]![searchTerm] = sentences; return sentences; } diff --git a/yuuna/pubspec.yaml b/yuuna/pubspec.yaml index 63ffd483..9eaff612 100644 --- a/yuuna/pubspec.yaml +++ b/yuuna/pubspec.yaml @@ -1,7 +1,7 @@ name: yuuna description: A full-featured immersion language learning suite for mobile. publish_to: 'none' -version: 2.8.6+101 +version: 2.8.7+102 environment: sdk: ">=3.0.0<4.0.0" flutter: "^3.10.5"