-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Address remaining feedback for 25.7. #23977
Conversation
Generated by 🚫 Danger |
📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
|
@@ -89,6 +89,7 @@ public final class ImagePrefetcher { | |||
value.task?.cancel() | |||
} | |||
queue.removeAll() | |||
numberOfActiveTasks = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe numberOfActiveTasks
needs to be updated in stopPrefetching
too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stopPrefetching
cancel the task task.task?.cancel()
but doesn't manually manipulate the queue
. The task will then need to cancel or run until the completion depending what's state it's in. So updating numberOfActiveTasks
is not needed there. This is the part I did test (manually). I didn't test stopAll
though because it's not used anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh. I see it now. numberOfActiveTasks
is updated in the actuallyPrefetchImage
task when the task is cancelled.
/// Initializes the struct with given size in **pixels**. | ||
public init(width: Int, height: Int) { | ||
self.width = Int(width) | ||
self.height = Int(height) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Int(...)
is not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
* Update ImageSize to use Int * Add ImageSize(pixels:) and document APIs * Rework ImageSize convenience APIs * Make ImageSize properties writable * Add note about deprecating passTouchesToSuperview * Fix stopAll * Remove redundant init
Fixes #
To test:
Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
PR submission checklist:
RELEASE-NOTES.txt
if necessary.Testing checklist: