2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 09:05:14 +00:00

Make custom text replaces work without replace emoji being enabled (#242)

This commit is contained in:
blank X
2021-12-17 14:00:14 +00:00
committed by GitHub
parent ca8b92d1e1
commit a851f7711d
12 changed files with 49 additions and 45 deletions

View File

@@ -162,9 +162,7 @@ void InitField(
not_null<QWidget*> container,
not_null<Ui::InputField*> field,
not_null<Main::Session*> session) {
field->setInstantReplaces(Ui::InstantReplaces::Default());
field->setInstantReplacesEnabled(
Core::App().settings().replaceEmojiValue());
field->setInstantReplaces(Core::App().settings().instantReplacesValue());
auto options = Ui::Emoji::SuggestionsController::Options();
options.suggestExactFirstWord = false;
Ui::Emoji::SuggestionsController::Init(
@@ -842,9 +840,7 @@ not_null<Ui::InputField*> CreatePollBox::setupSolution(
st::createPollFieldPadding);
InitField(getDelegate()->outerContainer(), solution, session);
solution->setMaxLength(kSolutionLimit + kErrorLimit);
solution->setInstantReplaces(Ui::InstantReplaces::Default());
solution->setInstantReplacesEnabled(
Core::App().settings().replaceEmojiValue());
solution->setInstantReplaces(Core::App().settings().instantReplacesValue());
solution->setMarkdownReplacesEnabled(rpl::single(true));
solution->setEditLinkCallback(
DefaultEditLinkCallback(_controller, solution));