Adjusts sys kbd setup help link to use help.keyman

This commit is contained in:
jahorton 2019-09-19 09:02:20 +07:00
parent 77e30dd527
commit 6afbdac2ae
2 changed files with 4 additions and 14 deletions

View file

@ -58,7 +58,7 @@ class InfoViewController: UIViewController, UIWebViewDelegate {
private func loadFromServer() {
let appVersion = Version.current
let url = "https://help.keyman.com/products/iphone-and-ipad/\(appVersion.string)/?embed=true"
let url = "https://help.keyman.com/products/iphone-and-ipad/\(appVersion.string)/?embed=ios"
webView.loadRequest(URLRequest(url: URL(string: url)!))
log.debug("Info page URL: \(url)")
}

View file

@ -62,19 +62,9 @@ class SetUpViewController: UIViewController, UIWebViewDelegate {
}
private func loadFromServer() {
let keyboardInfo = Manager.shared.currentKeyboard
let currentKeyboardId = keyboardInfo?.id ?? Defaults.keyboard.id
let userData = AppDelegate.activeUserDefaults()
let keyboards = userData.userKeyboards
let keyboardIds = keyboards?.map { $0.id }
let installedKeyboards: String
if let ids = keyboardIds, !ids.isEmpty {
installedKeyboards = Array(Set(ids)).joined(separator: ",")
} else {
installedKeyboards = currentKeyboardId
}
let url = "http://keyman.com/iphone-and-ipad/app/systemkeyboard/index.php" +
"?active=\(currentKeyboardId)&installed=\(installedKeyboards)"
let appVersion = Version.current
let url = "https://help.keyman.com/products/iphone-and-ipad/\(appVersion.string)"
+ "/installing-system-keyboard.php?embed=ios"
webView.loadRequest(URLRequest(url: URL(string: url)!))
log.debug("Set up page URL: \(url)")
}