Skip to content

fix(download): current User-Agent version and safer dictionary download - #833

Merged
LeanBitLab merged 1 commit into
mainfrom
fix/download-user-agent-and-dict-cleanup
Nov 15, 2026
Merged

LeanBitLab merged 1 commit into
mainfrom
fix/download-user-agent-and-dict-cleanup

Conversation

@LeanBitLab

Copy link
Copy Markdown
Owner

Summary

  • Replace the hardcoded `HeliboardL/3.8.9` User-Agent (6 sites) with `Links.USER_AGENT`, built from `BuildConfig.VERSION_NAME`.
  • `downloadDictionary`: disconnect the connection in a `finally` so a failure mid-download no longer leaks it.
  • `downloadDictionary`: no longer delete the existing dictionary before `renameTo` (rename replaces the target), so a failed rename keeps the old dictionary.

Verification

  • `./gradlew :app:assembleStandardDebug` passes
  • `./gradlew compileOfflineRunTestsKotlin` passes
  • Not tested on device: dictionary download, including a network cut mid-download

…ionary download

Replace the hardcoded HeliboardL/3.8.9 User-Agent with Links.USER_AGENT built from
BuildConfig.VERSION_NAME.

In downloadDictionary, disconnect the connection in a finally block so a failure
mid-download no longer leaks it, and stop deleting the existing dictionary before
the rename so a failed rename keeps the old one.
@LeanBitLab
LeanBitLab merged commit afc9339 into main Nov 15, 2026
1 check passed
@LeanBitLab
LeanBitLab deleted the fix/download-user-agent-and-dict-cleanup branch November 15, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant