mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Submit voice chat boxes by Enter.
This commit is contained in:
parent
0bb391937e
commit
6be9b25e99
1 changed files with 8 additions and 4 deletions
|
@ -48,11 +48,13 @@ void EditGroupCallTitleBox(
|
|||
box->setFocusCallback([=] {
|
||||
input->setFocusFast();
|
||||
});
|
||||
box->addButton(tr::lng_settings_save(), [=] {
|
||||
const auto submit = [=] {
|
||||
const auto result = input->getLastText().trimmed();
|
||||
box->closeBox();
|
||||
done(result);
|
||||
});
|
||||
};
|
||||
QObject::connect(input, &Ui::InputField::submitted, submit);
|
||||
box->addButton(tr::lng_settings_save(), submit);
|
||||
box->addButton(tr::lng_cancel(), [=] { box->closeBox(); });
|
||||
}
|
||||
|
||||
|
@ -76,11 +78,13 @@ void StartGroupCallRecordingBox(
|
|||
box->setFocusCallback([=] {
|
||||
input->setFocusFast();
|
||||
});
|
||||
box->addButton(tr::lng_group_call_recording_start_button(), [=] {
|
||||
const auto submit = [=] {
|
||||
const auto result = input->getLastText().trimmed();
|
||||
box->closeBox();
|
||||
done(result);
|
||||
});
|
||||
};
|
||||
QObject::connect(input, &Ui::InputField::submitted, submit);
|
||||
box->addButton(tr::lng_group_call_recording_start_button(), submit);
|
||||
box->addButton(tr::lng_cancel(), [=] { box->closeBox(); });
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue