-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Disable Story posts when Jetpack features are removed #19823
Changes from 2 commits
5787bbf
6197b2b
d9f9da6
afd7418
6336f62
b156b82
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -691,7 +691,8 @@ - (BOOL)supportsPluginManagement | |
- (BOOL)supportsStories | ||
{ | ||
BOOL hasRequiredJetpack = [self hasRequiredJetpackVersion:@"9.1"]; | ||
return hasRequiredJetpack || self.isHostedAtWPcom; | ||
// Stories are disabled in iPad until this Kanvas issue is solved: https://github.com/tumblr/kanvas-ios/issues/104 | ||
return (hasRequiredJetpack || self.isHostedAtWPcom) && ![UIDevice isPad] && ![JetpackFeaturesRemovalCoordinator shouldRemoveJetpackFeatures]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I noticed that we weren't using the same conditions for determining if the Story Post action should be shown in different places. For this reason, I decided to unify the logic into a single function. Specifically, checking if the device is an iPad. Based on this PR and this Kanvas issue, I understand that the Story post shouldn't be enabled on iPad. |
||
} | ||
|
||
- (BOOL)supportsContactInfo | ||
|
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.
I originally considered checking the
isPad
and feature removal conditions in a specific helper within theStoryAction
class. But I finally ended up using thesupports
functionality of the Blog model as the logic seemed closer to me. In any case, please let me know if there's a better approach for this, thanks!