mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-22 07:37:40 +00:00
Hides correct toggle instead of disabling
This commit is contained in:
parent
8b847b18a2
commit
7e9b0def23
1 changed files with 3 additions and 3 deletions
|
|
@ -92,7 +92,7 @@ class LanguageSettingsViewController: UITableViewController {
|
|||
userDefaults.set(predictSetting: value, forLanguageID: self.language.id)
|
||||
|
||||
// Reactively set the corrections switch interactivity state.
|
||||
self.doCorrectionsSwitch?.isEnabled = value
|
||||
self.doCorrectionsSwitch?.isHidden = !value
|
||||
self.doCorrectionsLabel?.isEnabled = value
|
||||
self.correctionsCell?.isUserInteractionEnabled = value
|
||||
|
||||
|
|
@ -163,7 +163,7 @@ class LanguageSettingsViewController: UITableViewController {
|
|||
}
|
||||
|
||||
// Disable interactivity if the prediction toggle is set to 'off'.
|
||||
doCorrectionsSwitch!.isEnabled = userDefaults.predictSettingForLanguage(languageID: self.language.id)
|
||||
doCorrectionsSwitch!.isHidden = !userDefaults.predictSettingForLanguage(languageID: self.language.id)
|
||||
cell.isUserInteractionEnabled = userDefaults.predictSettingForLanguage(languageID: self.language.id)
|
||||
} else { // rows 3 and 4
|
||||
cell.accessoryType = .disclosureIndicator
|
||||
|
|
@ -229,7 +229,7 @@ class LanguageSettingsViewController: UITableViewController {
|
|||
case 1:
|
||||
doCorrectionsLabel = cell.textLabel
|
||||
cell.textLabel?.text = "Enable corrections"
|
||||
cell.textLabel?.isEnabled = doCorrectionsSwitch?.isEnabled ?? false
|
||||
cell.textLabel?.isEnabled = !(doCorrectionsSwitch?.isHidden ?? false)
|
||||
case 2:
|
||||
cell.textLabel?.text = "Dictionaries"
|
||||
cell.accessoryType = .disclosureIndicator
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue