Skip to content

Commit 5b97973

Browse files
authored
feat: Enable sharing to non-Jetpack sites (#23778)
* feat: Enable sharing to non-Jetpack sites The Jetpack app is no longer positioned to be a product focused solely on Jetpack sites. Therefore, when sharing content to the Jetpack app, we should allow sharing content to non-Jetpack sites. * docs: Add release note * docs: Add release note for Stats navigation change This release note was previously overlooked. * docs: Assign notes to the correct release * refactor: Remove unnecessary `showJetpackSitesOnly` configuration The value no longer diverges between the WordPress and Jetpack targets.
1 parent e52be1f commit 5b97973

File tree

5 files changed

+5
-8
lines changed

5 files changed

+5
-8
lines changed

RELEASE-NOTES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
25.5
66
-----
77
* [***] Use web-based sign-in flow (hidden under a feature flag) [#23675]
8+
* [*] Enable navigating to an individual post's stats from within the "view more" screen for author stats. [#23761]
9+
* [*] [Jetpack-only] Enable pubishing to non-Jetpack sites when sharing content to the Jetpack app. [#23778]
810

911
25.4
1012
-----

WordPress/Classes/Services/BlogService.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ - (void)syncBlogsForAccount:(WPAccount *)account
3232

3333
id<AccountServiceRemote> remote = [self remoteForAccount:account];
3434

35-
BOOL filterJetpackSites = [AppConfiguration showJetpackSitesOnly];
35+
BOOL filterJetpackSites = false;
3636

3737
[remote getBlogs:filterJetpackSites success:^(NSArray *blogs) {
3838
[[[JetpackCapabilitiesService alloc] init] syncWithBlogs:blogs success:^(NSArray<RemoteBlog *> *blogs) {
@@ -404,7 +404,7 @@ - (void)associateSyncedBlogsToJetpackAccount:(WPAccount *)account
404404
{
405405
AccountServiceRemoteREST *remote = [[AccountServiceRemoteREST alloc] initWithWordPressComRestApi:account.wordPressComRestApi];
406406

407-
BOOL filterJetpackSites = [AppConfiguration showJetpackSitesOnly];
407+
BOOL filterJetpackSites = false;
408408

409409
[remote getBlogs:filterJetpackSites success:^(NSArray *remoteBlogs) {
410410
[self.coreDataStack performAndSaveUsingBlock:^(NSManagedObjectContext *context) {

WordPress/Classes/Utility/App Configuration/AppConfiguration.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import Foundation
99
@objc class AppConfiguration: NSObject {
1010
@objc static let isJetpack: Bool = false
1111
@objc static let isWordPress: Bool = true
12-
@objc static let showJetpackSitesOnly: Bool = false
1312
@objc static let allowsNewPostShortcut: Bool = true
1413
@objc static let allowsConnectSite: Bool = true
1514
@objc static let allowSignUp: Bool = true

WordPress/Jetpack/AppConfiguration.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import Foundation
99
@objc class AppConfiguration: NSObject {
1010
@objc static let isJetpack: Bool = true
1111
@objc static let isWordPress: Bool = false
12-
@objc static let showJetpackSitesOnly: Bool = false
1312
@objc static let allowsNewPostShortcut: Bool = true
1413
@objc static let allowsConnectSite: Bool = true
1514
@objc static let allowSignUp: Bool = true

WordPress/WordPressShareExtension/AppExtensionsService.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,7 @@ extension AppExtensionsService {
9696
func fetchSites(onSuccess: @escaping ([RemoteBlog]?) -> (), onFailure: @escaping FailureBlock) {
9797
let remote = AccountServiceRemoteREST(wordPressComRestApi: simpleRestAPI)
9898

99-
var filterJetpackSites = false
100-
#if IS_JETPACK
101-
filterJetpackSites = true
102-
#endif
99+
let filterJetpackSites = false
103100

104101
remote.getBlogs(filterJetpackSites, success: { blogs in
105102
guard let blogs = blogs as? [RemoteBlog] else {

0 commit comments

Comments
 (0)