Fixed crash in shortcut editor of push-to-talk.

This commit is contained in:
23rd 2020-12-04 01:01:14 +03:00
parent d41e93fb1c
commit d36fad7268
1 changed files with 4 additions and 2 deletions

View File

@ -194,9 +194,10 @@ void GroupCallSettingsBox(
const auto startRecording = [=] {
state->recording = true;
state->recordText = tr::lng_group_call_ptt_recording();
manager->startRecording([=](GlobalShortcut shortcut) {
auto progress = crl::guard(box, [=](GlobalShortcut shortcut) {
state->shortcutText = shortcut->toDisplayString();
}, [=](GlobalShortcut shortcut) {
});
auto done = crl::guard(box, [=](GlobalShortcut shortcut) {
state->recording = false;
state->shortcut = shortcut;
state->shortcutText = shortcut
@ -208,6 +209,7 @@ void GroupCallSettingsBox(
: QByteArray());
Core::App().saveSettingsDelayed();
});
manager->startRecording(std::move(progress), std::move(done));
};
const auto stopRecording = [=] {
state->recording = false;