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

Refactor the use of the AutoDownloadStatus enums #2506

Open
wants to merge 7 commits into
base: trunk
Choose a base branch
from

Conversation

SergioEstevao
Copy link
Contributor

| 📘 Part of: # |
|:---:|

Fixes #

On this PR we use the enum directly on the model type and avoid the uses of raw value and casting in the codebase. I also found that FMDatabase can support the use of Enum directly on their statements if they are a base type. Ex: Int32, Int, etc..

One of the things that was blocking it was that our base episode protocol was marked as ObjC. I thought there was some reason for the use of @objc tag on the protocols, but after removal I didn't get any kind of error.

If someone knows the reason why those protocols are marked @objc please comment bellow.

To test

  • Start the app
  • Download some episode
  • Check if download status updates are done correctly and reported in the app correctly.
  • Check if no crashes or warnings show up in the console.

Checklist

  • I have considered if this change warrants user-facing release notes and have added them to CHANGELOG.md if necessary.
  • I have considered adding unit tests for my changes.
  • I have updated (or requested that someone edit) the spreadsheet to reflect any new or changed analytics.

Use the enum directly on the model type and avoid the uses of raw value and casting in the codebase.
I also found that FMDatabase can support the use of Enum directly on their statements if they are a base type. Ex: Int32, Int, etc..
@SergioEstevao SergioEstevao added this to the 7.79 milestone Dec 5, 2024
@SergioEstevao SergioEstevao marked this pull request as ready for review December 9, 2024 10:04
@SergioEstevao SergioEstevao requested a review from a team as a code owner December 9, 2024 10:04
@SergioEstevao SergioEstevao requested review from danielebogo and removed request for a team December 9, 2024 10:04
@SergioEstevao SergioEstevao modified the milestones: 7.79, 7.80 Dec 9, 2024
@SergioEstevao
Copy link
Contributor Author

Version 7.79 has now entered code-freeze, so the milestone of this PR has been updated to 7.80.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant