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

iOS-392 Update UI for audiobook background download #1555

Merged
merged 4 commits into from May 6, 2022

Conversation

ErnestFan
Copy link
Contributor

What's this do?
Add new book state for audiobook download and update related unit test
Update book detail view UI for audiobook

Why are we doing this? (w/ JIRA link if applicable)
iOS-392

How should this be tested? / Do these changes have associated tests?
Download an audiobook
Check if the UI changes when the download cancel/fail/succeed

Dependencies for merging? Releasing to production?
N/A

Does this include changes that require a new SimplyE/Open eBooks build for QA?
Will do when everything is ready

Has the application documentation been updated for these changes?
N/A

Did someone actually run this code to verify it works?
@ErnestFan

@ErnestFan ErnestFan requested a review from ettore May 5, 2022 22:26
@ErnestFan ErnestFan self-assigned this May 5, 2022

- (void)updateColors {
self.backgroundColor = [NYPLConfiguration mainColor];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original logic does not set the background color when it is iOS 12.0+ and in Light mode. This fixes it. Same for the one below.

case NYPLBookStateDownloadFailed:
self.downloadFailedView.showAudiobookError = self.book.defaultBookContentType == NYPLBookContentTypeAudiobook;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this view is reused (I'm guessing), I was wondering if we need to reset the showAudiobookError flag to NO in the other cases of the switch, to avoid for example showing the error after a successful retry.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This flag set an audiobook specific error message to the message label within the downloadFailedView. Even if it is true after a successful retry, the downloadFailedView should still be hidden.

@ErnestFan ErnestFan merged commit 3bbcdff into feature/audiobookBackgroundDownload May 6, 2022
@ErnestFan ErnestFan deleted the task/ios-392 branch May 6, 2022 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants