diff --git a/Podfile b/Podfile index c69e07c3e64c..a97ab50c4885 100644 --- a/Podfile +++ b/Podfile @@ -154,7 +154,7 @@ target 'WordPress' do ## Gutenberg (React Native) ## ===================== ## - gutenberg :tag => 'v1.45.0-alpha1' + gutenberg :commmit => '08c959a727df6b11728157ae7a7c1abf51ea909b' ## Third party libraries ## ===================== diff --git a/WordPress/Classes/Utility/Editor/GutenbergSettings.swift b/WordPress/Classes/Utility/Editor/GutenbergSettings.swift index 4edf0a473de9..8ea79d63ec15 100644 --- a/WordPress/Classes/Utility/Editor/GutenbergSettings.swift +++ b/WordPress/Classes/Utility/Editor/GutenbergSettings.swift @@ -12,6 +12,7 @@ class GutenbergSettings { let url = urlStringFrom(blog) return "kShowGutenbergPhase2Dialog-" + url } + static let focalPointPickerTooltipShown = "kGutenbergFocalPointPickerTooltipShown" private static func urlStringFrom(_ blog: Blog) -> String { return (blog.url ?? "") @@ -157,6 +158,16 @@ class GutenbergSettings { database.set(true, forKey: Key.enabledOnce(for: blog)) } + /// True if it should show the tooltip for the focal point picker + var focalPointPickerTooltipShown: Bool { + get { + database.bool(forKey: Key.focalPointPickerTooltipShown) + } + set { + database.set(newValue, forKey: Key.focalPointPickerTooltipShown) + } + } + // MARK: - Gutenberg Choice Logic /// Call this method to know if Gutenberg must be used for the specified post. diff --git a/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift b/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift index d456757b2303..301435bac5b4 100644 --- a/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift +++ b/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift @@ -860,6 +860,14 @@ extension GutenbergViewController: GutenbergBridgeDelegate { }) } + func gutenbergDidRequestFocalPointPickerTooltipShown() -> Bool { + return gutenbergSettings.focalPointPickerTooltipShown + } + + func gutenbergDidRequestSetFocalPointPickerTooltipShown(_ tooltipShown: Bool) { + gutenbergSettings.focalPointPickerTooltipShown = tooltipShown + } + func gutenbergDidSendButtonPressedAction(_ buttonType: Gutenberg.ActionButtonType) { switch buttonType { case .missingBlockAlertActionButton: