Fix: quality not updating in the Audio Control Popover when changed

This commit is contained in:
Alex P 2025-09-05 17:36:43 +00:00
parent e45bec4a9c
commit 158437352c
1 changed files with 12 additions and 2 deletions

View File

@ -133,7 +133,12 @@ func handleSetAudioQuality(c *gin.Context) {
// Set the audio quality
audioControlService.SetAudioQuality(quality)
c.JSON(200, gin.H{"success": true})
// Return the updated configuration
current := audioControlService.GetCurrentAudioQuality()
c.JSON(200, gin.H{
"success": true,
"config": current,
})
}
// handleMicrophoneQuality handles GET requests for microphone quality presets
@ -166,5 +171,10 @@ func handleSetMicrophoneQuality(c *gin.Context) {
// Set the microphone quality
audioControlService.SetMicrophoneQuality(quality)
c.JSON(http.StatusOK, gin.H{"success": true})
// Return the updated configuration
current := audioControlService.GetCurrentMicrophoneQuality()
c.JSON(http.StatusOK, gin.H{
"success": true,
"config": current,
})
}