2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Add emoji autocomplete to all fields.

This commit is contained in:
John Preston
2018-11-21 14:09:46 +04:00
parent a1c61daea6
commit 9f5b09c263
22 changed files with 265 additions and 232 deletions

View File

@@ -558,13 +558,10 @@ HistoryWidget::HistoryWidget(
Unexpected("action in MimeData hook.");
});
_emojiSuggestions.create(this, _field->rawTextEdit());
_emojiSuggestions->setReplaceCallback([=](
int from,
int till,
const QString &replacement) {
_field->commitInstantReplacement(from, till, replacement);
});
const auto suggestions = Ui::Emoji::SuggestionsController::Init(
this,
_field);
_raiseEmojiSuggestions = [=] { suggestions->raise(); };
updateFieldSubmitSettings();
_field->hide();
@@ -1180,7 +1177,7 @@ void HistoryWidget::orderWidgets() {
if (_tabbedPanel) {
_tabbedPanel->raise();
}
_emojiSuggestions->raise();
_raiseEmojiSuggestions();
if (_tabbedSelectorToggleTooltip) {
_tabbedSelectorToggleTooltip->raise();
}