Skip to content

Commit 8ff226c

Browse files
committed
Merge remote-tracking branch 'origin/trunk' into fix/skip-perform-on-confined-concurrency
2 parents 3b35a71 + fcd3459 commit 8ff226c

27 files changed

+543
-134
lines changed

Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def shared_style_pods
9191
end
9292

9393
def gutenberg_pods
94-
gutenberg tag: 'v1.86.0-alpha1'
94+
gutenberg tag: 'v1.86.0'
9595
end
9696

9797
def gutenberg(options)

Podfile.lock

Lines changed: 105 additions & 105 deletions
Large diffs are not rendered by default.

RELEASE-NOTES.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
21.4
22
-----
3+
* [*] Fixed an issue where publishing Posts and Pages could fail under certain conditions. [#19717]
34
* [*] Share extension navigation bar is no longer transparent [#19700]
4-
* [***] [Jetpack-only] Adds a smooth, opt-in transition to the Jetpack app. [#19759]
5+
* [***] [Jetpack-only] Adds a smooth, opt-in transition to the Jetpack app for users migrating from the WordPress app. [#19759]
56
* [***] You can now migrate your site content to the Jetpack app without a hitch. [#19759]
7+
* [**] [internal] Upgrade React Native from 0.66.2 to 0.69.4 [https://github.com/wordpress-mobile/gutenberg-mobile/pull/5193]
8+
* [*] [internal] When a user migrates to the Jetpack app and allows notifications, WordPress app notifications are disabled. [#19616, #19611, #19590]
69

710
21.3
811
-----

WordPress/Classes/Models/Blog.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ - (void)prepareForDeletion
105105
{
106106
[super prepareForDeletion];
107107

108+
// delete stored password in the keychain for self-hosted sites.
109+
if ([self.username length] > 0 && [self.xmlrpc length] > 0) {
110+
self.password = nil;
111+
}
112+
108113
[_xmlrpcApi invalidateAndCancelTasks];
109114
[_wordPressOrgRestApi invalidateAndCancelTasks];
110115
}

WordPress/Classes/Services/BlogService.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ - (void)removeBlog:(Blog *)blog
481481
[accountService purgeAccountIfUnused:account];
482482
}
483483

484-
[[ContextManager sharedInstance] saveContext:self.managedObjectContext];
484+
[[ContextManager sharedInstance] saveContextAndWait:self.managedObjectContext];
485485
[WPAnalytics refreshMetadata];
486486
}
487487

WordPress/Classes/Services/JetpackNotificationMigrationService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ final class JetpackNotificationMigrationService: JetpackNotificationMigrationSer
2222
private let jetpackNotificationMigrationDefaultsKey = "jetpackNotificationMigrationDefaultsKey"
2323

2424
private var jetpackMigrationPreventDuplicateNotifications: Bool {
25-
return FeatureFlag.jetpackMigrationPreventDuplicateNotifications.enabled
25+
return featureFlagStore.value(for: FeatureFlag.jetpackMigrationPreventDuplicateNotifications)
2626
}
2727

2828
private var notificationSettingsService: NotificationSettingsService?

WordPress/Classes/Services/PostService.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,13 @@ forceDraftIfCreating:(BOOL)forceDraftIfCreating
160160
success:(nullable void (^)(void))success
161161
failure:(void (^)(NSError * _Nullable error))failure;
162162

163+
/**
164+
Creates a RemotePost from an AbstractPost to be used for API calls.
165+
166+
@param post The AbstractPost used to create the RemotePost
167+
*/
168+
- (RemotePost *)remotePostWithPost:(AbstractPost *)post;
169+
163170
@end
164171

165172
NS_ASSUME_NONNULL_END

WordPress/Classes/Services/PostService.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,11 @@ - (RemotePost *)remotePostWithPost:(AbstractPost *)post
814814
remotePost.password = post.password;
815815
remotePost.type = @"post";
816816
remotePost.authorAvatarURL = post.authorAvatarURL;
817-
remotePost.authorID = post.authorID;
817+
// If a Post's authorID is 0 (the default Core Data value)
818+
// or nil, don't send it to the API.
819+
if (post.authorID.integerValue != 0) {
820+
remotePost.authorID = post.authorID;
821+
}
818822
remotePost.excerpt = post.mt_excerpt;
819823
remotePost.slug = post.wp_slug;
820824

WordPress/Classes/System/WordPressAppDelegate.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ class WordPressAppDelegate: UIResponder, UIApplicationDelegate {
330330
setupWordPressExtensions()
331331

332332
if FeatureFlag.contentMigration.enabled {
333+
// To prevent race condition, initialize the shared instance synchronously so it can listen to account change notifications.
334+
let _ = ContentMigrationCoordinator.shared
335+
333336
// Start proactively exporting WP data in the background if the conditions are fulfilled.
334337
// This needs to be called after `setupWordPressExtensions` because it updates the stored data.
335338
DispatchQueue.global().async {

WordPress/Classes/Utility/Blogging Reminders/BloggingRemindersScheduler.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,17 @@ class BloggingRemindersScheduler {
158158
}
159159
}
160160

161+
/// Deletes backup reminders if it exists.
162+
///
163+
static func deleteBackupReminders() {
164+
guard FeatureFlag.contentMigration.enabled,
165+
let sharedFileURL = sharedDataFileURL() else {
166+
return
167+
}
168+
169+
try? FileManager.default.removeItem(at: sharedFileURL)
170+
}
171+
161172
private static func copyStoreToSharedFile() {
162173
guard let store = try? defaultStore(),
163174
let sharedFileUrl = sharedDataFileURL() else {

0 commit comments

Comments
 (0)