Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor refactor of theming when expressions #396

Merged
merged 2 commits into from
Feb 14, 2024
Merged

Conversation

MajorTanya
Copy link
Contributor

Avoids triggering detekt's CyclomaticComplexMethod warning because of too many when branches, which would happen with one more theme being added in these two locations.

In TachiyomiTheme, the Monet theme is separated because it requires the current Compose context to function. The other themes do not and are delegated to a Map.

Avoids triggering detekt's CyclomaticComplexMethod warning because of
too many when branches, which would happen with one more theme being
added in these two locations.

In TachiyomiTheme, the Monet theme is separated because it requires
the current Compose context to function. The other themes do not and
are delegated to a Map.
- moved themeResources out of the ThemingDelegate interface
- replaced single condition when with if expression
@AntsyLich AntsyLich merged commit 96c236e into mihonapp:main Feb 14, 2024
1 check passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants