This repository was archived by the owner on Sep 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ let package = Package(
1111 targets: [
1212 . binaryTarget(
1313 name: " WordPressKit " ,
14- url: " https://github.com/user-attachments/files/19034191 /WordPressKit.zip " ,
15- checksum: " 34f108cba86b5e4334d1c9af79946dbb8b665e270bdd14bc8f7bc0ba7a898583 "
14+ url: " https://github.com/user-attachments/files/19315257 /WordPressKit.zip " ,
15+ checksum: " 1b4ba5cef01a64e98ffdc02a5c8ac92f550f234222bfb6abf11b4b4df94435bc "
1616 ) ,
1717 ]
1818)
Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ import Foundation
5858 /// Blog's total disk quota space used.
5959 public var quotaSpaceUsed : NSNumber ?
6060
61+ public var isDeleted : Bool
62+
6163 /// Parses details from a JSON dictionary, as returned by the WordPress.com REST API.
6264 @objc ( initWithJSONDictionary: )
6365 public init ( jsonDictionary json: NSDictionary ) {
@@ -79,6 +81,7 @@ import Foundation
7981 self . planActiveFeatures = ( json. array ( forKeyPath: " plan.features.active " ) as? [ String ] ) ?? [ ]
8082 self . quotaSpaceAllowed = json. number ( forKeyPath: " quota.space_allowed " )
8183 self . quotaSpaceUsed = json. number ( forKeyPath: " quota.space_used " )
84+ self . isDeleted = json. number ( forKey: " is_deleted " ) ? . boolValue == true
8285 }
8386
8487}
Original file line number Diff line number Diff line change @@ -385,10 +385,14 @@ - (RemoteUser *)remoteUserFromDictionary:(NSDictionary *)dictionary
385385- (NSArray *)remoteBlogsFromJSONArray : (NSArray *)jsonBlogs
386386{
387387 NSArray *blogs = jsonBlogs;
388- return [blogs wpkit_map: ^id (NSDictionary *jsonBlog) {
388+ return [[ blogs wpkit_map: ^id (NSDictionary *jsonBlog) {
389389 return [[RemoteBlog alloc ] initWithJSONDictionary: jsonBlog];
390+ }] wpkit_filter: ^BOOL (RemoteBlog *blog) {
391+ // Exclude deleted sites from query result, since the app does not handle deleted sites properly.
392+ // I tried to use query arguments `site_visibility=visible` and `site_activity=active`, but neither excludes
393+ // deleted sites.
394+ return !blog.isDeleted ;
390395 }];
391- return blogs;
392396}
393397
394398@end
You can’t perform that action at this time.
0 commit comments