feat(26-04): call loadJamTrack when track is not synchronized

- Added loadJamTrack call in handleJamTrackSelect else branch
- When syncResult.isSynchronized is false, triggers download flow
- This transitions state through checking → packaging → downloading → keying → synchronized
- Fixes empty JamTrack player for non-synchronized tracks
This commit is contained in:
Nuwan 2026-02-25 23:44:45 +05:30
parent 6423df4b7b
commit 6d92e93a63
1 changed files with 5 additions and 1 deletions

View File

@ -1191,11 +1191,15 @@ const JKSessionScreen = () => {
currentUser: currentUser
}));
// Show appropriate message based on sync state
// Handle sync result
if (syncResult.isSynchronized) {
// Already synchronized - show success
toast.success(`Loaded JamTrack: ${jamTrackWithStems.name}`);
} else {
// Not synchronized - start download flow
// This will transition state through checking → packaging → downloading → keying → synchronized
toast.info(`Loading JamTrack: ${jamTrackWithStems.name}...`);
loadJamTrack(jamTrackWithStems);
}
} catch (error) {
// console.error('Error loading jam track:', error);