Skip to content

Commit

Permalink
fix noun-gender annotation formatting on device orientation change #396
Browse files Browse the repository at this point in the history
  • Loading branch information
Taufi committed Mar 15, 2024
1 parent 26f8a39 commit 8dc1444
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Keyboards/KeyboardsBase/KeyboardViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,10 @@ class KeyboardViewController: UIInputViewController {
/// - A call to loadKeys to reload the display after an orientation change
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransition(to: size, with: coordinator)
Timer.scheduledTimer(withTimeInterval: 0.2, repeats: false) { _ in
coordinator.animate(alongsideTransition: { (context) in
self.updateViewConstraints()
}
self.loadKeys()
})
Timer.scheduledTimer(withTimeInterval: 0.2, repeats: false) { _ in
isFirstKeyboardLoad = true
self.loadKeys()
Expand All @@ -226,9 +227,11 @@ class KeyboardViewController: UIInputViewController {
alternatesShapeLayer.removeFromSuperlayer()
}
annotationState = false
isFirstKeyboardLoad = true
loadKeys()
isFirstKeyboardLoad = false
Timer.scheduledTimer(withTimeInterval: 0.1, repeats: false) { _ in
isFirstKeyboardLoad = true
self.loadKeys()
isFirstKeyboardLoad = false
}
}

// MARK: Scribe Command Elements
Expand Down

0 comments on commit 8dc1444

Please sign in to comment.