Release 1.2.0

- Fixed a crash on broad queries (e.g. a single letter across several
  dictionaries): the results list keyed items by dictionary
  path/offset/word, and duplicate keys are illegal in a Compose list;
  drop the explicit key, let Paging identify items by position instead
  (SearchResultsList).
- Fixed a disabled dictionary reactivating itself on the next app
  launch: the active flag is now persisted through
  PreferencesManager/DataStore and reapplied whenever the dictionary
  list is rebuilt (LocalDictionaryRepository).
- Search results no longer stop at the first ~100-200 matches: the
  ranked head page hands back a cursor per unfinished prefix range,
  and IndexEntryPagingSource pages the rest straight from the index,
  merged alphabetically across dictionaries, until every match is
  surfaced (IndexSearcher, IndexEntryPagingSource).
- Added diacritic-insensitive search: folded index entries are merged
  into the primary index as aliases, so accented and plain spellings
  find each other (DslIndexer, IndexSearcher).
- Fixed indexing failures on dictionaries with dense non-Latin text: a
  truncated multi-byte sequence at a sample boundary was misread as
  invalid UTF-8 and the whole file fell back to UTF-16LE
  (DslCharsetDetector).
This commit is contained in:
OneWay committed 2026-07-22 16:29:16 +03:00
1 parent a5f3af83a4
commit 84612b26f2
21 files changed
+630 -243

No files matched your search

@@ -41,7 +41,6 @@ fun SearchResultsList(
) {
items(
count = results.itemCount,
key = results.itemKey { entry -> "${entry.dictionaryPath}_${entry.offset.value}_${entry.word}" },
contentType = results.itemContentType { "search_result" }
) { index ->
results[index]?.let { entry ->
@@ -331,7 +331,9 @@ class SettingsViewModel(
}
private fun toggleDictionaryActive(dictionaryPath: String) {
localDictionaryRepository.toggleDictionaryActive(dictionaryPath)
viewModelScope.launch {
localDictionaryRepository.toggleDictionaryActive(dictionaryPath)
}
}
private fun deleteDictionary(dictionary: Dictionary) {