Remove code duplication

This commit is contained in:
Maurice Parker 2020-10-30 11:21:49 -05:00
parent c1c8b97b08
commit 81ae58e061
1 changed files with 1 additions and 5 deletions

View File

@ -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