mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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([=] {
|
box->setFocusCallback([=] {
|
||||||
input->setFocusFast();
|
input->setFocusFast();
|
||||||
});
|
});
|
||||||
box->addButton(tr::lng_settings_save(), [=] {
|
const auto submit = [=] {
|
||||||
const auto result = input->getLastText().trimmed();
|
const auto result = input->getLastText().trimmed();
|
||||||
box->closeBox();
|
box->closeBox();
|
||||||
done(result);
|
done(result);
|
||||||
});
|
};
|
||||||
|
QObject::connect(input, &Ui::InputField::submitted, submit);
|
||||||
|
box->addButton(tr::lng_settings_save(), submit);
|
||||||
box->addButton(tr::lng_cancel(), [=] { box->closeBox(); });
|
box->addButton(tr::lng_cancel(), [=] { box->closeBox(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,11 +78,13 @@ void StartGroupCallRecordingBox(
|
||||||
box->setFocusCallback([=] {
|
box->setFocusCallback([=] {
|
||||||
input->setFocusFast();
|
input->setFocusFast();
|
||||||
});
|
});
|
||||||
box->addButton(tr::lng_group_call_recording_start_button(), [=] {
|
const auto submit = [=] {
|
||||||
const auto result = input->getLastText().trimmed();
|
const auto result = input->getLastText().trimmed();
|
||||||
box->closeBox();
|
box->closeBox();
|
||||||
done(result);
|
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(); });
|
box->addButton(tr::lng_cancel(), [=] { box->closeBox(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue