Skip to content

Commit

Permalink
fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
AcacioFernando committed Aug 10, 2021
1 parent a8a29eb commit 14b7d2d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/BlipChat/ThreadViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,20 @@ internal class ThreadViewController: UIViewController, WKNavigationDelegate, UIS
}

/// Handle keyboard appearing on screen
@objc func keyboardWillShow(notification: NSNotification) {
if let keyboardSize = (notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue {
let statusBarHeight = UIApplication.shared.statusBarFrame.height
let navBarheight = self.navigationController?.navigationBar.bounds.size.height
let height = -keyboardSize.height + statusBarHeight + navBarheight!
self.view.frame.origin.y = height
@objc func keyboardWillShow(notification: NSNotification) {
if let keyboardSize = (notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue {
let statusBarHeight = UIApplication.shared.statusBarFrame.height
let navBarheight = self.navigationController?.navigationBar.bounds.size.height
let height = -keyboardSize.height + statusBarHeight + navBarheight!
self.view.frame.origin.y = height

bottomConstraint.constant = -keyboardSize.height
updateViewConstraints()
bottomConstraint.constant = -keyboardSize.height
updateViewConstraints()

// Notify about blipchat that keyboard is open
self.webView.evaluateJavaScript("setKeyboardOpen(true)", completionHandler: nil)
}
}
// Notify about blipchat that keyboard is open
self.webView.evaluateJavaScript("setKeyboardOpen(true)", completionHandler: nil)
}
}

/// Handle keyboard hiding on screen
@objc func keyboardWillHide(notification: NSNotification) {
Expand Down

0 comments on commit 14b7d2d

Please sign in to comment.