mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 23:53:58 +02:00
Fixed crash in shortcut editor of push-to-talk.
This commit is contained in:
parent
d41e93fb1c
commit
d36fad7268
1 changed files with 4 additions and 2 deletions
|
@ -194,9 +194,10 @@ void GroupCallSettingsBox(
|
||||||
const auto startRecording = [=] {
|
const auto startRecording = [=] {
|
||||||
state->recording = true;
|
state->recording = true;
|
||||||
state->recordText = tr::lng_group_call_ptt_recording();
|
state->recordText = tr::lng_group_call_ptt_recording();
|
||||||
manager->startRecording([=](GlobalShortcut shortcut) {
|
auto progress = crl::guard(box, [=](GlobalShortcut shortcut) {
|
||||||
state->shortcutText = shortcut->toDisplayString();
|
state->shortcutText = shortcut->toDisplayString();
|
||||||
}, [=](GlobalShortcut shortcut) {
|
});
|
||||||
|
auto done = crl::guard(box, [=](GlobalShortcut shortcut) {
|
||||||
state->recording = false;
|
state->recording = false;
|
||||||
state->shortcut = shortcut;
|
state->shortcut = shortcut;
|
||||||
state->shortcutText = shortcut
|
state->shortcutText = shortcut
|
||||||
|
@ -208,6 +209,7 @@ void GroupCallSettingsBox(
|
||||||
: QByteArray());
|
: QByteArray());
|
||||||
Core::App().saveSettingsDelayed();
|
Core::App().saveSettingsDelayed();
|
||||||
});
|
});
|
||||||
|
manager->startRecording(std::move(progress), std::move(done));
|
||||||
};
|
};
|
||||||
const auto stopRecording = [=] {
|
const auto stopRecording = [=] {
|
||||||
state->recording = false;
|
state->recording = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue