Skip to content

Commit

Permalink
fix: meaning cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Arenukvern committed May 4, 2024
1 parent 6c26fd2 commit db833e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ abstract base class WbwDictionaryLocalSourceBase {
final meaning = record?['meaning'];
final m = meaning == null || meaning is! String ? '' : meaning;
if (m.isEmpty) return m;
return m.clearWhitespaces();
return m;
}

Future<int> getDictionaryLength() => _store.query().count(_eDb);
Expand Down
5 changes: 3 additions & 2 deletions packages/wbw_dictionaries/lib/src/wbw_dictionary.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ class WbwDictionary extends ValueNotifier<WbwDictionariesLoadingStatus> {
bool get isNotLoaded =>
value == WbwDictionariesLoadingStatus.notLoaded || isLoading;
int debugLoadingTimeInSeconds = 0;
Future<String> getWordMeaning(final WordMeaningRequestTuple tuple) =>
repository.getWordMeaning(tuple, isLocalAllowed: isLoaded);
Future<String> getWordMeaning(final WordMeaningRequestTuple tuple) async =>
(await repository.getWordMeaning(tuple, isLocalAllowed: isLoaded))
.clearWhitespaces();

/// checks all languages
///
Expand Down

0 comments on commit db833e9

Please sign in to comment.