feat: add audio mode config

This commit is contained in:
Kingtous
2023-01-30 22:06:52 +08:00
parent 393e0e9afb
commit 8ab49d11d1
3 changed files with 43 additions and 12 deletions

View File

@@ -94,6 +94,10 @@ impl<T: InvokeUiSession> Session<T> {
}
pub fn save_audio_mode(&self, value: String) {
let mode = LoginConfigHandler::get_audio_mode_enum(value.as_str(), false);
if let Some(mode)= mode {
self.send(Data::ChangeAudioMode(mode));
}
let msg = self.lc.write().unwrap().save_audio_mode(value);
// Notify remote guest that the audio mode has been changed.
if let Some(msg) = msg {