diff --git a/src/components/syncPlay/core/Manager.js b/src/components/syncPlay/core/Manager.js index 3f8f4da704..16640c1df2 100644 --- a/src/components/syncPlay/core/Manager.js +++ b/src/components/syncPlay/core/Manager.js @@ -193,10 +193,19 @@ class Manager { this.queueCore.updatePlayQueue(apiClient, cmd.Data); break; case 'UserJoined': + toast(globalize.translate('MessageSyncPlayUserJoined', cmd.Data)); + if (!this.groupInfo.Participants) { + this.groupInfo.Participants = [cmd.Data]; + } else { + this.groupInfo.Participants.push(cmd.Data); + } break; case 'UserLeft': toast(globalize.translate('MessageSyncPlayUserLeft', cmd.Data)); + if (this.groupInfo.Participants) { + this.groupInfo.Participants = this.groupInfo.Participants.filter((user) => user !== cmd.Data); + } break; case 'GroupJoined': cmd.Data.LastUpdatedAt = new Date(cmd.Data.LastUpdatedAt); diff --git a/src/components/syncPlay/ui/groupSelectionMenu.js b/src/components/syncPlay/ui/groupSelectionMenu.js index 809c2cbd5a..807899773f 100644 --- a/src/components/syncPlay/ui/groupSelectionMenu.js +++ b/src/components/syncPlay/ui/groupSelectionMenu.js @@ -7,6 +7,7 @@ import actionsheet from '../../actionSheet/actionSheet'; import globalize from '../../../scripts/globalize'; import playbackPermissionManager from './playbackPermissionManager'; import ServerConnections from '../../ServerConnections'; +import './groupSelectionMenu.scss'; /** * Class that manages the SyncPlay group selection menu. @@ -63,7 +64,8 @@ class GroupSelectionMenu { title: globalize.translate('HeaderSyncPlaySelectGroup'), items: menuItems, positionTo: button, - border: true + border: true, + dialogClass: 'syncPlayGroupMenu' }; actionsheet.show(menuOptions).then(function (id) { @@ -139,6 +141,8 @@ class GroupSelectionMenu { const menuOptions = { title: groupInfo.GroupName, + text: groupInfo.Participants.join(', '), + dialogClass: 'syncPlayGroupMenu', items: menuItems, positionTo: button, border: true diff --git a/src/components/syncPlay/ui/groupSelectionMenu.scss b/src/components/syncPlay/ui/groupSelectionMenu.scss new file mode 100644 index 0000000000..9f0c402e29 --- /dev/null +++ b/src/components/syncPlay/ui/groupSelectionMenu.scss @@ -0,0 +1,4 @@ +.syncPlayGroupMenu .actionSheetText { + margin-left: 0.6em; /* to line up with the title */ + margin-top: 0; +}