2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Implement media device tracking on macOS.

This commit is contained in:
John Preston
2024-01-23 13:23:32 +04:00
parent 736b489eb7
commit 65a80766f4
3 changed files with 9 additions and 4 deletions

View File

@@ -555,7 +555,8 @@ void ChooseAudioDeviceBox(
return;
}
const auto weak = Ui::MakeWeak(box);
chosen(state->ids.take(value).value_or(kDefaultDeviceId));
const auto i = state->ids.find(value);
chosen((i != end(state->ids)) ? i->second : kDefaultDeviceId);
if (weak) {
box->closeBox();
}