diff options
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/group-page.js')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/group-page.js | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/group-page.js b/packages/meshbay-hub/src/meshbay_hub/static/group-page.js index 341d37e..fec685b 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/group-page.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/group-page.js @@ -355,11 +355,9 @@ function GroupPage({ groupId, group, token, username, userId, userPrefs, // missing `video_directories` as "nothing configured" would empty a // working Videos tab. setAppDirectories({ - video: ack.video_directories - || (ack.video_root ? [ack.video_root] : []), - music: ack.music_directories - || (ack.audio_root ? [ack.audio_root] : []), - photo: ack.photo_directories || ack.photo_roots || [], + video: ack.video_directories || [], + music: ack.music_directories || [], + photo: ack.photo_directories || [], }); setChatDirectory(ack.chat_directory || ''); setChatLinkPreview(ack.chat_link_preview !== false); @@ -374,16 +372,9 @@ function GroupPage({ groupId, group, token, username, userId, userPrefs, // recent value. transport.onTmdbConfig = (cfg) => setTmdbConfig((prev) => ({ ...(prev || {}), ...cfg })); transport.onTmdbEnabled = (enabled) => setTmdbConfig((prev) => ({ ...(prev || {}), enabled })); - // One handler for every app's directories, plus the three older - // per-app messages a node that predates the generic op still sends. + // One handler for every app's directories, keyed by the app's name. transport.onAppDirectories = (app, dirs) => setAppDirectories((prev) => ({ ...prev, [app]: dirs })); - transport.onVideoRoot = (path) => setAppDirectories( - (prev) => ({ ...prev, video: path ? [path] : [] })); - transport.onAudioRoot = (path) => setAppDirectories( - (prev) => ({ ...prev, music: path ? [path] : [] })); - transport.onPhotoRoots = (roots) => setAppDirectories( - (prev) => ({ ...prev, photo: roots || [] })); transport.onChatDirectory = (path) => setChatDirectory(path); transport.onChatLinkPreview = (on) => setChatLinkPreview(on); transport.onMusicbrainzEnabled = (enabled) => |