fix async call order in configure audio

This error was appearing in audio gear configuration when clicking Next button in
select & test audio gear step. on this button click the program executed
an event listener on input channel check box click (programmatically) and
autoAssignToSingleInput inside the click event handler was invoked
an async call stack which was resolved before the next button click handler completed.
As a result a pop up was showing up saying "The application is no longer modifying a new profile".

This commits fixes this issue by explicitly preventing this event lister handler been executed
in this case.
This commit is contained in:
Nuwan 2023-02-23 19:12:16 +05:30
parent 4cef5acde8
commit 359ccfe431
1 changed files with 4 additions and 2 deletions

View File

@ -1128,7 +1128,6 @@
}
async function handleNext() {
var $assignedInputs = $inputChannels.find('input[type="checkbox"]:checked');
var $assignedOutputs = $outputChannels.find('input[type="checkbox"]:checked');
@ -1194,7 +1193,9 @@
return;
}
var $unassignedInputs = $inputChannels.find('input[type="checkbox"]:not(:checked)')
iCheckIgnore = true;
$allInputs.eq(0).iCheck('check').attr('checked', 'checked')
iCheckIgnore = false;
var maxTries = 36;
for(var i = 0; i < maxTries; i++) {
@ -1212,7 +1213,9 @@
}
else {
// the goal of this loop is to just uncheck one. once it's done that, it breaks the loop, so that assigned can be fetched again
iCheckIgnore = true;
$node.iCheck('uncheck').removeAttr('checked')
iCheckIgnore = false;
return false;
}
})
@ -1324,7 +1327,6 @@
}
async function assertFTUEProfile() {
if(savedProfile) {return;} // once we save the profile, it's name no longer starts with FTUE
var profileName = await context.jamClient.FTUEGetMusicProfileName();
if(profileName && profileName.indexOf('FTUE') != 0) {