mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-10 01:27:43 +00:00
add info debugging to track which viewcontroller is appearing
This commit is contained in:
parent
477cb9b55d
commit
e9b2ce33db
7 changed files with 36 additions and 3 deletions
|
|
@ -43,7 +43,8 @@ class KeyboardInfoViewController: UITableViewController, UIAlertViewDelegate {
|
|||
override func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
navigationController?.setToolbarHidden(true, animated: true)
|
||||
}
|
||||
log.info("didAppear: KeyboardInfoViewController")
|
||||
}
|
||||
|
||||
override func numberOfSections(in tableView: UITableView) -> Int {
|
||||
return 1
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ class KeyboardPickerViewController: UITableViewController, UIAlertViewDelegate {
|
|||
|
||||
navigationController?.setToolbarHidden(false, animated: true)
|
||||
scroll(toSelectedKeyboard: false)
|
||||
log.info("didAppear: KeyboardPickerViewController")
|
||||
}
|
||||
|
||||
override func numberOfSections(in tableView: UITableView) -> Int {
|
||||
|
|
|
|||
|
|
@ -45,6 +45,12 @@ class LanguageDetailViewController: UITableViewController, UIAlertViewDelegate {
|
|||
observer: self,
|
||||
function: LanguageDetailViewController.keyboardDownloadFailed)
|
||||
}
|
||||
|
||||
override open func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
|
||||
log.info("didAppear: LanguageDetailViewController (actually willAppear)")
|
||||
}
|
||||
|
||||
override func numberOfSections(in tableView: UITableView) -> Int {
|
||||
return language.keyboards!.count
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ class LanguageViewController: UITableViewController, UIAlertViewDelegate {
|
|||
}
|
||||
|
||||
loadUserKeyboards()
|
||||
loadUserLexicalModels()
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
|
|
@ -76,8 +77,10 @@ class LanguageViewController: UITableViewController, UIAlertViewDelegate {
|
|||
// if no rows to show yet, show a loading indicator
|
||||
if numberOfSections(in: tableView) == 0 {
|
||||
showActivityView()
|
||||
} else {
|
||||
log.info("didAppear: LanguageViewController")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override func numberOfSections(in tableView: UITableView) -> Int {
|
||||
return languages.count
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ class LexicalModelInfoViewController: UITableViewController, UIAlertViewDelegate
|
|||
override func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
navigationController?.setToolbarHidden(true, animated: true)
|
||||
log.info("didAppear: LexicalModelInfoViewController")
|
||||
}
|
||||
|
||||
override func numberOfSections(in tableView: UITableView) -> Int {
|
||||
|
|
|
|||
|
|
@ -59,6 +59,13 @@ class InstalledLanguagesViewController: UITableViewController, UIAlertViewDelega
|
|||
forName: Notifications.keyboardDownloadFailed,
|
||||
observer: self,
|
||||
function: InstalledLanguagesViewController.keyboardDownloadFailed)
|
||||
|
||||
if Manager.shared.canAddNewKeyboards {
|
||||
let addButton = UIBarButtonItem(barButtonSystemItem: .add, target: self,
|
||||
action: #selector(self.addClicked))
|
||||
navigationItem.rightBarButtonItem = addButton
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
|
|
@ -67,6 +74,8 @@ class InstalledLanguagesViewController: UITableViewController, UIAlertViewDelega
|
|||
// if no rows to show yet, show a loading indicator
|
||||
if numberOfSections(in: tableView) == 0 {
|
||||
showActivityView()
|
||||
} else {
|
||||
log.info("didAppear: InstalledLanguagesViewController")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -348,5 +357,16 @@ extension InstalledLanguagesViewController: LexicalModelRepositoryDelegate {
|
|||
dismissActivityView()
|
||||
showConnectionErrorAlert()
|
||||
}
|
||||
|
||||
@objc func addClicked(_ sender: Any) {
|
||||
showAddKeyboard()
|
||||
}
|
||||
|
||||
func showAddKeyboard() {
|
||||
let button: UIButton? = (navigationController?.toolbar?.viewWithTag(toolbarButtonTag) as? UIButton)
|
||||
button?.isEnabled = false
|
||||
let vc = LanguageViewController(Manager.shared.apiKeyboardRepository)
|
||||
navigationController?.pushViewController(vc, animated: true)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ open class SettingsViewController: UITableViewController {
|
|||
super.viewWillAppear(animated)
|
||||
|
||||
loadUserLanguages()
|
||||
}
|
||||
log.info("didAppear: SettingsViewController (actually willAppear)")
|
||||
}
|
||||
|
||||
override open func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue