mirror of
https://github.com/jellyfin/jellyfin-roku.git
synced 2024-11-23 22:29:43 +00:00
refactor to remove else clause
This commit is contained in:
parent
388bd0a371
commit
491ef43fd5
@ -48,14 +48,14 @@ end sub
|
||||
|
||||
' get the currently focused item
|
||||
function getFocusedItem() as dynamic
|
||||
if isValid(m.top.focusedChild) and isValid(m.top.focusedChild.focusedChild)
|
||||
focusedChild = m.top.focusedChild.focusedChild
|
||||
if not isValid(focusedChild.content) then return invalid
|
||||
m.top.lastFocus = focusedChild
|
||||
else
|
||||
if not isValid(m.top.focusedChild) or not isValid(m.top.focusedChild.focusedChild)
|
||||
return invalid
|
||||
end if
|
||||
|
||||
focusedChild = m.top.focusedChild.focusedChild
|
||||
if not isValid(focusedChild.content) then return invalid
|
||||
m.top.lastFocus = focusedChild
|
||||
|
||||
if isValidAndNotEmpty(focusedChild.rowItemFocused)
|
||||
itemToPlay = focusedChild.content.getChild(focusedChild.rowItemFocused[0]).getChild(0)
|
||||
if isValid(itemToPlay) and isValidAndNotEmpty(itemToPlay.id)
|
||||
|
Loading…
Reference in New Issue
Block a user