Added support of custom emoji to translate box.

This commit is contained in:
23rd 2022-12-08 17:59:53 +03:00
parent 620f6657ae
commit b4a7d98fa0
3 changed files with 9 additions and 3 deletions

View File

@ -317,7 +317,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_intro_qr_title" = "Scan From Mobile Telegram";
"lng_intro_qr_step1" = "Open Telegram on your phone";
"lng_intro_qr_step2" = "Go to Settings > Devices > Scan QR Code";
"lng_intro_qr_step2" = "Go to Settings > Devices > Link Desktop";
"lng_intro_qr_step3" = "Scan this image to Log In";
"lng_intro_qr_skip" = "Or log in using your phone number";

View File

@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/application.h"
#include "core/core_settings.h"
#include "core/ui_integration.h"
#include "data/data_peer.h"
#include "lang/lang_instance.h"
#include "lang/lang_keys.h"
@ -196,7 +197,12 @@ void TranslateBox(
original->entity()->setContextMenuHook([](auto&&) {
});
}
original->entity()->setMarkedText(text);
original->entity()->setMarkedText(
text,
Core::MarkedTextContext{
.session = &peer->session(),
.customEmojiRepaint = [=] { original->entity()->update(); },
});
original->setMinimalHeight(lineHeight);
original->hide(anim::type::instant);

@ -1 +1 @@
Subproject commit 95d14bb5abec1df1463fe1083820119160edc579
Subproject commit 68e0b6fa217c9f2ea82a79f073113c8c5ff6e6c5