mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 05:58:38 +00:00
Submit voice chat boxes by Enter.
This commit is contained in:
parent
0bb391937e
commit
6be9b25e99
@ -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…
x
Reference in New Issue
Block a user