From f40556f00780f092d86323a659ac84caa79d436b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20F=C3=A4th?= Date: Wed, 15 Jan 2020 17:48:27 +0100 Subject: [PATCH] Hide if select is not available --- src/components/remotecontrol/remotecontrol.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/components/remotecontrol/remotecontrol.js b/src/components/remotecontrol/remotecontrol.js index 68a6bb5f76..6c43e81756 100644 --- a/src/components/remotecontrol/remotecontrol.js +++ b/src/components/remotecontrol/remotecontrol.js @@ -215,23 +215,12 @@ define(["browser", "datetime", "backdrop", "libraryBrowser", "listView", "imageL context.querySelector(".sendTextSection").classList.add("hide"); } - if (-1 != supportedCommands.indexOf("MoveUp" || "MoveDown" || "MoveRight" || "MoveRight" || "MoveLeft" || "Select" || "Back" || "ToggleContextMenu" || "GoToSearch" || "GoToSettings" || "GoHome") && !currentPlayer.isLocalPlayer) { + if (-1 != supportedCommands.indexOf("Select") && !currentPlayer.isLocalPlayer) { context.querySelector(".navigationSection").classList.remove("hide"); } else { context.querySelector(".navigationSection").classList.add("hide"); } - buttonVisible(context.querySelector(".btnArrowUp"), -1 != supportedCommands.indexOf("MoveUp")); - buttonVisible(context.querySelector(".btnArrowLeft"), -1 != supportedCommands.indexOf("MoveDown")); - buttonVisible(context.querySelector(".btnArrowRight"), -1 != supportedCommands.indexOf("MoveRight")); - buttonVisible(context.querySelector(".btnArrowDown"), -1 != supportedCommands.indexOf("MoveLeft")); - buttonVisible(context.querySelector(".btnOk"), -1 != supportedCommands.indexOf("Select")); - buttonVisible(context.querySelector(".btnBack"), -1 != supportedCommands.indexOf("Back")); - buttonVisible(context.querySelector(".btnContextMenu"), -1 != supportedCommands.indexOf("ToggleContextMenu")); - buttonVisible(context.querySelector(".btnShowSearch"), -1 != supportedCommands.indexOf("GoToSearch")); - buttonVisible(context.querySelector(".bthShowSettings"), -1 != supportedCommands.indexOf("GoToSettings")); - buttonVisible(context.querySelector(".btnGoHome"), -1 != supportedCommands.indexOf("GoHome")); - buttonVisible(context.querySelector(".btnStop"), null != item); buttonVisible(context.querySelector(".btnNextTrack"), null != item); buttonVisible(context.querySelector(".btnPreviousTrack"), null != item);