Skip to content

Conversation

@HatakeKakashri
Copy link
Contributor

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  • Added all the preference items of Debug screen.
  • Implemented all actions / callbacks for the debug preferences, including checking for new streams, intentionally crashing the app, and displaying error notifications and snackbars.
  • Refactored the SettingsViewModel to use a BooleanPreference helper class to reuse and reducing boilerplate for state management.
  • Created a shared TextBase composable to remove duplicated UI logic between SwitchPreference and TextPreference.
  • Move the build-variant-dependent logic for LeakCanary and reused it in Compose and Fragment, this logic is used for ensuring the leak canary fields are only enabled in debug variants.
  • Fixed a layout bug in SwitchPreference where long summary text could misalign the switch component and also adjusted the paddings for consistency.

Before/After Screenshots/Screen Record (The toolbar colors are to be handled in a seperate PR #12654)

Screenshot_20251115_112209

Fixes the following issue(s)

Relies on the following changes

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

@github-actions github-actions bot added the size/large PRs with less than 750 changed lines label Nov 15, 2025
- Added all the preference items of Debug screen.
- Implemented all actions / callbacks for the debug preferences, including
  checking for new streams, intentionally crashing the app, and displaying
  error notifications and snackbars.
- Refactored the `SettingsViewModel` to use a `BooleanPreference` helper
  class to reuse and reducing boilerplate for state management.
- Created a shared `TextBase` composable to remove duplicated UI logic between
  `SwitchPreference` and `TextPreference`.
- Move the build-variant-dependent logic for LeakCanary and reused it in
  Compose and Fragment, this logic is used for ensuring the leak canary
  fields are only enabled in debug variants.
- Fixed a layout bug in `SwitchPreference` where long summary text could
  misalign the switch component and also adjusted the paddings for consistency.
@TobiGr TobiGr added this to Rewrite Nov 15, 2025
@github-project-automation github-project-automation bot moved this to In Progress in Rewrite Nov 15, 2025
@TobiGr TobiGr added the rewrite Issues and PRs related to rewrite label Nov 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rewrite Issues and PRs related to rewrite size/large PRs with less than 750 changed lines

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants