Skip to content

Fix/exhaustive when#7835

Open
NWuensche wants to merge 2 commits intoduckduckgo:developfrom
NWuensche:fix/exhaustive_when
Open

Fix/exhaustive when#7835
NWuensche wants to merge 2 commits intoduckduckgo:developfrom
NWuensche:fix/exhaustive_when

Conversation

@NWuensche
Copy link

@NWuensche NWuensche commented Feb 28, 2026

Task/Issue URL: /

Description

Optimize when-clauses by removing cases that can never happen (sealed classes - else cases as well as java - null interop type)

Steps to test this PR

  • Compile the app

UI changes

None


Note

Low Risk
Low risk cleanup to make when expressions exhaustive and remove dead/default branches; behavior should be unchanged aside from always acknowledging processed commands in Autofill screens.

Overview
Cleans up multiple when statements (design system, Autofill, VPN exclusions, PIR state handlers, subscriptions feedback, and Gradle ModuleType) by removing unreachable else/no-op branches and relying on Kotlin exhaustiveness.

In Autofill command handling (AutofillManagementActivity and AutofillManagementCredentialsMode), the processed-command logging and viewModel.commandProcessed call are now unconditional after the when, aligning with the assumption that commands are fully covered.

Written by Cursor Bugbot for commit fbb3a28. This will update automatically on new commits. Configure here.

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