Remove code duplication
This commit is contained in:
parent
c1c8b97b08
commit
81ae58e061
|
@ -225,11 +225,7 @@ private extension AccountsPreferencesViewController {
|
|||
}
|
||||
|
||||
func showController(_ controller: NSViewController) {
|
||||
|
||||
if let controller = children.first {
|
||||
children.removeAll()
|
||||
controller.view.removeFromSuperview()
|
||||
}
|
||||
hideController()
|
||||
|
||||
addChild(controller)
|
||||
controller.view.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
|
Loading…
Reference in New Issue