-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Load all categories instead of just the first page #24785
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
Conversation
The `raw` property becomes Optional in Automattic/wordpress-rs#863, to handle revision related endpoints. However, it's still returned in the /media?context=edit responses.
0e43b4b
to
eb10e28
Compare
|
|
App Name | Jetpack | |
Configuration | Release-Alpha | |
Build Number | 28703 | |
Version | PR #24785 | |
Bundle ID | com.jetpack.alpha | |
Commit | eb10e28 | |
Installation URL | 3l3p1q9kcv60g |
|
App Name | WordPress | |
Configuration | Release-Alpha | |
Build Number | 28703 | |
Version | PR #24785 | |
Bundle ID | org.wordpress.alpha | |
Commit | eb10e28 | |
Installation URL | 14dpaohu7iba0 |
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.
LGTM.
I don't have a site with these many categories for testing, so I didnt.
@@ -144,7 +144,7 @@ private extension RemoteMedia { | |||
|
|||
self.mediaID = NSNumber(value: media.id) | |||
self.url = URL(string: media.sourceUrl) | |||
self.guid = URL(string: media.guid.raw) | |||
self.guid = media.guid.raw.flatMap(URL.init(string:)) |
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.
nit
URL.init
should work.
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.
Nice. So I guess the compiler infers which initializer to use when seeing URL.init
? I'll leave this code as it is for now, but I'll try this shorter syntax next time.
Description
The
getCategoriesWithSuccess:failure:
function was implemented incorrectly. We are supposed to return all categories, but the implementation only returns the first page. This PR fixes that issue.