fix(ios): delayed banner

This commit is contained in:
jahorton 2024-03-05 09:35:51 +07:00
parent c6a287307b
commit a4cdc9203c
2 changed files with 6 additions and 4 deletions

View file

@ -423,8 +423,6 @@ extension KeymanWebViewController {
} else { // We're registering a model in the background - don't change settings.
webView!.evaluateJavaScript("keyman.addModel(\(stubString));", completionHandler: nil)
}
setBannerHeight(to: Int(InputViewController.topBarHeight))
}
func showBanner(_ display: Bool) {
@ -744,6 +742,8 @@ extension KeymanWebViewController: KeymanWebDelegate {
// Reset the keyboard's size.
keyboardSize = kbSize
setBannerHeight(to: Int(InputViewController.topBarHeight))
fixLayout()
// Will trigger Manager's `keyboardLoaded` method.

View file

@ -76,7 +76,9 @@ function showBanner(flag) {
console.log("Setting banner display for dictionaryless keyboards to " + flag);
var bc = keyman.osk.bannerController;
bc.inactiveBanner = flag ? new bc.ImageBanner(bannerImgPath) : null;
if(bannerImgPath) {
bc.inactiveBanner = new bc.ImageBanner(bannerImgPath);
}
}
function setBannerImage(path) {
@ -88,7 +90,7 @@ function setBannerImage(path) {
}
// If an inactive banner is set, update its image.
bc.inactiveBanner = bc.inactiveBanner ? new bc.ImageBanner(bannerImgPath) : null;
bc.inactiveBanner = new bc.ImageBanner(bannerImgPath);
}
function setBannerHeight(h) {