From a7499f9db1a668353191d6eb809e4a4bf995eb0d Mon Sep 17 00:00:00 2001 From: Nuwan Date: Fri, 26 Dec 2025 19:15:32 +0530 Subject: [PATCH] update --- .../components/client/JKSessionInviteModal.js | 4 ++-- jam-ui/src/components/client/JKSessionMyTrack.js | 16 ++-------------- jam-ui/src/components/client/JKSessionScreen.js | 2 +- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/jam-ui/src/components/client/JKSessionInviteModal.js b/jam-ui/src/components/client/JKSessionInviteModal.js index a0f8ec28b..452b6cbe1 100644 --- a/jam-ui/src/components/client/JKSessionInviteModal.js +++ b/jam-ui/src/components/client/JKSessionInviteModal.js @@ -7,7 +7,7 @@ import { useTranslation } from 'react-i18next'; //TODO: show already invited friends as chips and prevent re-inviting them -const JKSessionInviteModal = ({ currentSession, size, show, onToggle, friends, initialInvitees = [], onSubmit, loading }) => { +const JKSessionInviteModal = ({ currentSession, show, onToggle, friends, initialInvitees = [], onSubmit, loading }) => { const { t } = useTranslation(); const [availableFriends, setAvailableFriends] = useState([]); const [invitees, setInvitees] = useState([]); @@ -45,7 +45,7 @@ const JKSessionInviteModal = ({ currentSession, size, show, onToggle, friends, i }; return ( - +
Invite to Session diff --git a/jam-ui/src/components/client/JKSessionMyTrack.js b/jam-ui/src/components/client/JKSessionMyTrack.js index 8be0dd8b7..50a77e2e7 100644 --- a/jam-ui/src/components/client/JKSessionMyTrack.js +++ b/jam-ui/src/components/client/JKSessionMyTrack.js @@ -10,7 +10,7 @@ import JKSessionPluginModal from './JKSessionPluginModal'; import JKSessionPanModal from './JKSessionPanModal'; import JKProfileSidePanel from '../profile/JKProfileSidePanel'; import { UncontrolledTooltip } from 'reactstrap'; -import { getInstrumentName, getInstrumentIcon45, convertClientInstrumentToServer } from '../../helpers/utils'; +import { getInstrumentName } from '../../helpers/utils'; import { getPersonById } from '../../helpers/rest'; import { ASSIGNMENT } from '../../helpers/globals'; import './JKSessionMyTrack.css'; @@ -44,7 +44,6 @@ const JKSessionMyTrack = ({ const [showPanModal, setShowPanModal] = useState(false); const [showProfilePanel, setShowProfilePanel] = useState(false); const [profileUser, setProfileUser] = useState(null); - const [currentInstrumentIcon, setCurrentInstrumentIcon] = useState(instrumentIcon); console.log('JKSessionMyTrack instrumentIcon:', instrumentIcon); @@ -54,14 +53,6 @@ const JKSessionMyTrack = ({ } }, [mixers]); - useEffect(() => { - // Only update local state if the prop has actually changed from our current state - // This prevents the server refresh from overwriting our immediate UI update - if (currentInstrumentIcon !== instrumentIcon) { - setCurrentInstrumentIcon(instrumentIcon); - } - }, [instrumentIcon, currentInstrumentIcon]); - const trackClasses = `session-track ${isChat ? 'chat-track' : 'my-track'} ${hasMixer ? 'has-mixer' : 'no-mixer'}`; const panStyle = { @@ -124,9 +115,6 @@ const JKSessionMyTrack = ({ const handleInstrumentSave = instrumentId => { // For user's own track, use TRACK1 jamClient.TrackSetInstrument(ASSIGNMENT.TRACK1, instrumentId); - // Immediately update the icon for instant UI feedback - const serverInstrumentId = convertClientInstrumentToServer(instrumentId); - setCurrentInstrumentIcon(getInstrumentIcon45(serverInstrumentId)); setShowInstrumentModal(false); }; @@ -174,7 +162,7 @@ const JKSessionMyTrack = ({ onClick={!isRemote ? handleInstrumentClick : undefined} style={!isRemote ? { cursor: 'pointer' } : {}} > - instrument + instrument {!isRemote && track?.hasVst && (