As we only create one categoryview it is better to check the visible child type. Using == did not seem to be working and as the category view has no associated plug the else clause was giving errors.
At present we can assume all leaflet children except the single categoryview have an associated plug. Should this change the code here will have to be revisited.
Review without whitespace changes which got fixed in passing.
Fixes the terminal warnings noted here: https://github.com/elementary/switchboard/pull/246#pullrequestreview-1119421015
As we only create one categoryview it is better to check the visible child type. Using
==
did not seem to be working and as the category view has no associated plug theelse
clause was giving errors.At present we can assume all leaflet children except the single categoryview have an associated plug. Should this change the code here will have to be revisited.
Review without whitespace changes which got fixed in passing.