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

simplify enum constants; remove unused code #943

Merged
merged 2 commits into from
Jun 29, 2023

Conversation

Jeepston
Copy link
Collaborator

Purpose

Simplifies usage of enum constants; removes unused code

Approach

  • convert all read-only enum constants from cases to static let variables, which allows to drop usage of .rawValue in all places where that constant is needed
  • removed unused constant enum related to artwork theme colours, since everything theme-related was moved to SimpleTheme

@GianniCarlo
Copy link
Collaborator

@Jeepston It looks like the build is failing because the PlayerSettingsViewModelTests.swift and PlayerManagerTests.swift still use the .rawValue

Screenshot 2023-06-28 at 18 03 47 Screenshot 2023-06-28 at 18 02 28

@Jeepston
Copy link
Collaborator Author

Ah yes, I knew I've missed something :D For some reason, project didn't have Test scheme generated. After adding and compiling for tests, I was able to fix it.

@GianniCarlo GianniCarlo merged commit 55216e3 into TortugaPower:develop Jun 29, 2023
1 check passed
@Jeepston Jeepston deleted the simplify-enum-constants branch June 30, 2023 09:57
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.

2 participants