Skip to content

Conversation

WiMank
Copy link
Contributor

@WiMank WiMank commented Sep 5, 2025

This commit refactors the codebase to leverage Android KTX extensions for more idiomatic Kotlin code.

Specific changes include:

  • Using String.toUri() for Uri parsing.
  • Using SharedPreferences.edit { ... } for simplified SharedPreferences editing.
  • Using View.isVisible for managing view visibility.
  • Updating getInstallerPackageName usage to getInstallSourceInfo for Android R and above.

@CLAassistant
Copy link

CLAassistant commented Sep 5, 2025

CLA assistant check
All committers have signed the CLA.

- Replace `View.visibility` with `View.isVisible`
- Replace `Uri.parse(String)` with `String.toUri()`
- Replace `SharedPreferences.edit().*().apply()` with `SharedPreferences.edit { *() }`
- Use `JSONPropertyName` for `published_at` and `tag_name` fields in `GithubRelease`
- Update `getInstallerPackageName` to use `getInstallSourceInfo` for Android R and above
@WiMank WiMank force-pushed the ref-code-and-style branch from 5963c3c to 404e0c2 Compare September 5, 2025 11:01
Copy link
Member

@pimterry pimterry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thanks for opening this issue @WiMank. There's definitely some good improvements here, the one question is around the GitHub release JSON parsing change.

Use Klaxon's @JSON annotation to map JSON keys to field names.
@pimterry pimterry merged commit e1e062b into httptoolkit:main Sep 12, 2025
5 checks passed
@pimterry
Copy link
Member

Nice work, thanks @WiMank! In case you're not aware, HTTP Toolkit Pro is free for all contributors - I've just activated that for the email from your git commits, just click 'Get Pro' then 'Log into existing account' in HTTP Toolkit and enter your email to get started.

Copy link

sentry-io bot commented Sep 16, 2025

Issues attributed to commits in this pull request

This pull request was merged and Sentry observed the following issues:

Did you find this useful? React with a 👍 or 👎

@pimterry
Copy link
Member

Don't worry about the above @WiMank - that's an existing issue which isn't related to this, not sure why Sentry is picking it up (and honestly, not sure why Sentry is actively commenting at all - must be a new feature, I've now turned that off).

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.

3 participants