From bc3fa85b9df0cfbf10e94594bd6ce36f57c73cca Mon Sep 17 00:00:00 2001 From: OneWay Date: Mon, 17 Aug 2026 22:08:37 +0300 Subject: [PATCH] Release 1.5.0 - The dictionary update card now returns after a failed download - Fixed headwords and articles with escaped characters being displayed incorrectly - Fixed slow rendering of articles containing many bracket characters --- README.md | 6 +-- app/build.gradle.kts | 4 +- .../research/ui/settings/SettingsViewModel.kt | 41 +++++++++++-------- .../metadata/android/en-US/changelogs/8.txt | 3 ++ .../metadata/android/ru-RU/changelogs/8.txt | 3 ++ gradle/libs.versions.toml | 4 +- 6 files changed, 38 insertions(+), 23 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/8.txt create mode 100644 fastlane/metadata/android/ru-RU/changelogs/8.txt diff --git a/README.md b/README.md index 5cd6759..5066cd6 100644 --- a/README.md +++ b/README.md @@ -95,15 +95,15 @@ The main search screen remains usable as long as at least one indexed dictionary ## Tech Stack - Kotlin 2.4.10 -- Jetpack Compose (BOM 2026.06.01) +- Jetpack Compose (BOM 2026.08.00) - Material 3 - Coroutines and Flow 1.11.0 - DataStore Preferences 1.2.1 -- Paging 3.5.0 +- Paging 3.5.1 - OkHttp 5.4.0 - kotlinx.serialization 1.11.0 - AboutLibraries 15.0.4 metadata generation -- Android Gradle Plugin 9.3.0 +- Android Gradle Plugin 9.3.1 ## Build diff --git a/app/build.gradle.kts b/app/build.gradle.kts index cb068c9..b4f0776 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -92,8 +92,8 @@ android { applicationId = "com.example.research" minSdk = project.property("minSdk").toString().toInt() targetSdk = project.property("targetSdk").toString().toInt() - versionCode = 7 - versionName = "1.4.0" + versionCode = 8 + versionName = "1.5.0" vectorDrawables { useSupportLibrary = true diff --git a/app/src/main/java/com/example/research/ui/settings/SettingsViewModel.kt b/app/src/main/java/com/example/research/ui/settings/SettingsViewModel.kt index e68aa69..e90164d 100644 --- a/app/src/main/java/com/example/research/ui/settings/SettingsViewModel.kt +++ b/app/src/main/java/com/example/research/ui/settings/SettingsViewModel.kt @@ -84,6 +84,8 @@ class SettingsViewModel( private var isDownloadInProgress = false private var cancelRefreshPending = false + private var errorStateHandled = false + private var statusBeforeDownload: DictionaryStatus = DictionaryStatus.Unknown init { setupStateObservation() @@ -147,32 +149,37 @@ class SettingsViewModel( is DownloadState.Loading, is DownloadState.Extracting -> { isDownloadInProgress = true cancelRefreshPending = false + errorStateHandled = false } is DownloadState.Success -> { pendingSourceUrls.clear() } is DownloadState.Error -> { isDownloadInProgress = false - dictionaryStatus.value = if (dictionaryState.dictionaries.isEmpty()) { - DictionaryStatus.Empty - } else { - DictionaryStatus.UpToDate - } - if (pendingSourceUrls.isNotEmpty()) { - pendingSourceUrls.forEach { urlTemplate -> - val source = dictionaryState.dictionarySources.find { - it.urlTemplate == urlTemplate - } - if (source != null) { - val hasDictionary = dictionaryState.dictionaries.any { dictionary -> - DictionarySourceFileMatcher.matches(source, dictionary) + if (!errorStateHandled) { + errorStateHandled = true + dictionaryStatus.value = if (dictionaryState.dictionaries.isEmpty()) { + DictionaryStatus.Empty + } else when (statusBeforeDownload) { + DictionaryStatus.Unknown, DictionaryStatus.Checking -> DictionaryStatus.UpToDate + else -> statusBeforeDownload + } + if (pendingSourceUrls.isNotEmpty()) { + pendingSourceUrls.forEach { urlTemplate -> + val source = dictionaryState.dictionarySources.find { + it.urlTemplate == urlTemplate } - if (!hasDictionary) { - manageDictionarySourcesUseCase.removeSource(source.id) + if (source != null) { + val hasDictionary = dictionaryState.dictionaries.any { dictionary -> + DictionarySourceFileMatcher.matches(source, dictionary) + } + if (!hasDictionary) { + manageDictionarySourcesUseCase.removeSource(source.id) + } } } + pendingSourceUrls.clear() } - pendingSourceUrls.clear() } } is DownloadState.Cancelled -> { @@ -412,6 +419,7 @@ class SettingsViewModel( return@launch } + statusBeforeDownload = dictionaryStatus.value dictionaryStatus.value = DictionaryStatus.Checking isDownloadInProgress = true @@ -435,6 +443,7 @@ class SettingsViewModel( return@launch } + statusBeforeDownload = dictionaryStatus.value dictionaryStatus.value = DictionaryStatus.Checking val installedSources = installedEnabledSources( diff --git a/fastlane/metadata/android/en-US/changelogs/8.txt b/fastlane/metadata/android/en-US/changelogs/8.txt new file mode 100644 index 0000000..a69bf1f --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/8.txt @@ -0,0 +1,3 @@ +- The dictionary update card now returns after a failed download +- Fixed headwords and articles with escaped characters being displayed incorrectly +- Fixed slow rendering of articles containing many bracket characters diff --git a/fastlane/metadata/android/ru-RU/changelogs/8.txt b/fastlane/metadata/android/ru-RU/changelogs/8.txt new file mode 100644 index 0000000..f58c032 --- /dev/null +++ b/fastlane/metadata/android/ru-RU/changelogs/8.txt @@ -0,0 +1,3 @@ +- Карточка обновления словарей теперь появляется снова после неудачной загрузки +- Исправлено отображение заголовков и статей с экранированными символами +- Исправлено медленное отображение статей с большим количеством скобок diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c5c06c1..995b01b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,14 +2,14 @@ aboutlibraries = "15.0.4" activity_compose = "1.13.0" agp = "9.3.1" -compose_bom = "2026.06.01" +compose_bom = "2026.08.00" core = "1.19.0" datastore_preferences = "1.2.1" documentfile = "1.1.0" kotlin = "2.4.10" lifecycle_runtime_ktx = "2.11.0" okhttp = "5.4.0" -paging = "3.5.0" +paging = "3.5.1" profileinstaller = "1.4.1" kotlinx_coroutines = "1.11.0" kotlinx_serialization = "1.11.0"