mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-24 16:51:19 +01:00
Remove code duplication
This commit is contained in:
parent
c1c8b97b08
commit
81ae58e061
@ -225,11 +225,7 @@ private extension AccountsPreferencesViewController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func showController(_ controller: NSViewController) {
|
func showController(_ controller: NSViewController) {
|
||||||
|
hideController()
|
||||||
if let controller = children.first {
|
|
||||||
children.removeAll()
|
|
||||||
controller.view.removeFromSuperview()
|
|
||||||
}
|
|
||||||
|
|
||||||
addChild(controller)
|
addChild(controller)
|
||||||
controller.view.translatesAutoresizingMaskIntoConstraints = false
|
controller.view.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
Loading…
Reference in New Issue
Block a user