Skip to content

Commit

Permalink
Merge pull request #14359 from wordpress-mobile/issue/14354-orgCrash
Browse files Browse the repository at this point in the history
Add guard around self-hosted site generation to help limit the risk o…
  • Loading branch information
Chip authored Jun 26, 2020
2 parents c489b3f + 1051424 commit 3e97347
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
15.2
----
* [**] Block editor: Display content metrics information (blocks, words, characters count).
* [*] Fixed a crash that results in navigating to the block editor quickly after logging out and immediately back in.
* [***] Reader content improved: a lot of fixes in how the content appears when you're reading a post.

-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,14 +349,14 @@ class GutenbergViewController: UIViewController, PostEditor {
private var previousFirstResponder: UIView?

private func setupKeyboardObservers() {
keyboardShowObserver = NotificationCenter.default.addObserver(forName: UIResponder.keyboardDidShowNotification, object: nil, queue: .main) { (notification) in
if let keyboardRect = notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect {
keyboardShowObserver = NotificationCenter.default.addObserver(forName: UIResponder.keyboardDidShowNotification, object: nil, queue: .main) { [weak self] (notification) in
if let self = self, let keyboardRect = notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect {
self.keyboardFrame = keyboardRect
self.updateConstraintsToAvoidKeyboard(frame: keyboardRect)
}
}
keyboardHideObserver = NotificationCenter.default.addObserver(forName: UIResponder.keyboardDidShowNotification, object: nil, queue: .main) { (notification) in
if let keyboardRect = notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect {
keyboardHideObserver = NotificationCenter.default.addObserver(forName: UIResponder.keyboardDidShowNotification, object: nil, queue: .main) { [weak self] (notification) in
if let self = self, let keyboardRect = notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect {
self.keyboardFrame = keyboardRect
self.updateConstraintsToAvoidKeyboard(frame: keyboardRect)
}
Expand Down

0 comments on commit 3e97347

Please sign in to comment.