diff --git a/src/scripts/libraryMenu.js b/src/scripts/libraryMenu.js index e3087cded3..1ebd56ac06 100644 --- a/src/scripts/libraryMenu.js +++ b/src/scripts/libraryMenu.js @@ -6,7 +6,6 @@ import viewManager from '../components/viewManager/viewManager'; import { appRouter } from '../components/appRouter'; import { appHost } from '../components/apphost'; import { playbackManager } from '../components/playback/playbackmanager'; -import SyncPlay from '../components/syncPlay/core'; import groupSelectionMenu from '../components/syncPlay/ui/groupSelectionMenu'; import browser from './browser'; import globalize from './globalize'; @@ -32,7 +31,7 @@ import Headroom from 'headroom.js'; html += ''; html += '
'; html += ''; - html += ''; + html += ''; html += ''; html += ''; html += ''; @@ -134,7 +133,7 @@ import Headroom from 'headroom.js'; const policy = user.Policy ? user.Policy : user.localUser.Policy; const apiClient = getCurrentApiClient(); - if (headerSyncButton && policy && policy.SyncPlayAccess !== 'None' && apiClient.isMinServerVersion('10.6.0')) { + if (headerSyncButton && policy?.SyncPlayAccess !== 'None' && apiClient.isMinServerVersion('10.6.0')) { headerSyncButton.classList.remove('hide'); } } else { @@ -233,26 +232,6 @@ import Headroom from 'headroom.js'; groupSelectionMenu.show(btn); } - function onSyncPlayEnabled(event, enabled) { - const icon = headerSyncButton.querySelector('span'); - icon.classList.remove('sync', 'sync_disabled', 'sync_problem'); - if (enabled) { - icon.classList.add('sync'); - } else { - icon.classList.add('sync_disabled'); - } - } - - function onSyncPlaySyncing(event, is_syncing) { - const icon = headerSyncButton.querySelector('span'); - icon.classList.remove('sync', 'sync_disabled', 'sync_problem'); - if (is_syncing) { - icon.classList.add('sync_problem'); - } else { - icon.classList.add('sync'); - } - } - function getItemHref(item, context) { return appRouter.getRouteUrl(item, { context: context @@ -1023,9 +1002,6 @@ import Headroom from 'headroom.js'; Events.on(playbackManager, 'playerchange', updateCastIcon); - Events.on(SyncPlay.Manager, 'enabled', onSyncPlayEnabled); - Events.on(SyncPlay.Manager, 'syncing', onSyncPlaySyncing); - loadNavDrawer(); const LibraryMenu = {