Skip to content

Commit

Permalink
Fix retain cycle in GutenbergViewController (#22265)
Browse files Browse the repository at this point in the history
  • Loading branch information
kean authored Dec 25, 2023
2 parents abae7fc + b765975 commit 1ae3a1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* [***] [Jetpack-only] Plans: Upgrade to a WPCOM plan from domains dashboard in Jetpack app. [#22261]
* [**] [internal] Refactor domain selection flows to use the same domain selection UI. [22254]
* [**] Re-enable the support for using Security Keys as a second factor during login [#22258]
* [*] Fix crash in editor that sometimes happens after modifying tags or categories [#22265]

23.9
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ class PrepublishingViewController: UITableViewController {
return PublishSettingsViewModel(post: post)
}()

private lazy var presentedVC: DrawerPresentationController? = {
private var presentedVC: DrawerPresentationController? {
return (navigationController as? PrepublishingNavigationController)?.presentedVC
}()
}

enum CompletionResult {
case completed(AbstractPost)
Expand Down Expand Up @@ -133,13 +133,11 @@ class PrepublishingViewController: UITableViewController {
/// Toggles `keyboardShown` as the keyboard notifications come in
private func configureKeyboardToggle() {
NotificationCenter.default.publisher(for: UIResponder.keyboardDidShowNotification)
.map { _ in return true }
.assign(to: \.keyboardShown, on: self)
.sink { [weak self] _ in self?.keyboardShown = true }
.store(in: &cancellables)

NotificationCenter.default.publisher(for: UIResponder.keyboardDidHideNotification)
.map { _ in return false }
.assign(to: \.keyboardShown, on: self)
.sink { [weak self] _ in self?.keyboardShown = false }
.store(in: &cancellables)
}

Expand Down

0 comments on commit 1ae3a1a

Please sign in to comment.