Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
21.9
-----

* [*] [internal] Refactored fetching posts in the Reader tab, including post related operations (i.e. like/unlike, save for latter, etc.) [#20197]
* [**] Reader: Add a button in the post menu to block an author and stop seeing their posts. [#20193]
* [**] [Jetpack-only] Jetpack individual plugin support: Warns user about sites with only individual plugins not supporting all features of the app yet and gives the ability to install the full Jetpack plugin. [#20223]
* [**] [Jetpack-only] Help: Display the Jetpack app FAQ card on Help screen when switching from the WordPress app to the Jetpack app is complete. [#20232]
* [***] [Jetpack-only] Blaze: We added support for Blaze in the app. The user can now promote a post or page from the app to reach new audiences. [#20253]

21.8.1
-----

* [**] [internal] Fixes a crash that happens in the background when the weekly roundup notification is being processed. [#20275]

21.8
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,20 +115,43 @@ class JetpackFeaturesRemovalCoordinator: NSObject {
}

/// Used to determine if the Jetpack features are enabled based on the current app UI type.
/// This way we ensure features are not removed before reloading the UI.
/// But if this function is called from a background thread, we determine if the Jetpack Features
/// are enabled based on the removal phase regardless of the app UI state.
/// Default root view coordinator is used.
@objc
static func jetpackFeaturesEnabled() -> Bool {
guard Thread.isMainThread else {
return shouldEnableJetpackFeatures()
}
return jetpackFeaturesEnabled(rootViewCoordinator: .shared)
}

/// Used to determine if the Jetpack features are enabled based on the current app UI type.
/// This way we ensure features are not removed before reloading the UI.
/// But if this function is called from a background thread, we determine if the Jetpack Features
/// are enabled based on the removal phase regardless of the app UI state.
/// Using two separate methods (rather than one method with a default argument) because Obj-C.
/// - Returns: `true` if UI type is normal, and `false` if UI type is simplified.
static func jetpackFeaturesEnabled(rootViewCoordinator: RootViewCoordinator) -> Bool {
guard Thread.isMainThread else {
return shouldEnableJetpackFeatures()
}
return rootViewCoordinator.currentAppUIType == .normal
}


/// Used to determine if the Jetpack features are enabled based on the removal phase regardless of the app UI state.
private static func shouldEnableJetpackFeatures(featureFlagStore: RemoteFeatureFlagStore = RemoteFeatureFlagStore()) -> Bool {
let phase = generalPhase()
switch phase {
case .four, .newUsers, .selfHosted:
return false
default:
return true
}
}

/// Used to display feature-specific or feature-collection overlays.
/// - Parameters:
/// - viewController: The view controller where the overlay should be presented in.
Expand Down