Kodi Community Forum

Full Version: Visibility condition question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to reduce the visibility checks XBMC has to make but would like to know how it works for conditions inside other conditions.

ie

PHP Code:
<control type="group>
    <visible>Container.Content(episodes)</visible>
    ...
    <control type="
group">
        <visible>Skin.HasSettings(ShowRuntimes)</visible>
    ...
    </control>
</control> 

Does XBMC ignore the 'ShowRuntimes' condition when the container doesn't contain episodes or is that still checked even though it wont be shown?

Thanks.
Currently, no it doesn't. The UpdateVisibility for the group is done during the group's render function.

With some patches in topfs2's GSoC branch, it will move to a separate function but I believe it still won't be evaluated, so in either case you're good.
In that case would it be more efficient to separate out to new views (with just the one visibility condition) than have a view full of visibility conditions?

EDIT: Nevermind, I found out myself by trying it and it is better.