diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 5c3ddffb3..ce1365a22 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -325,6 +325,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_settings_replace_emojis" = "Replace emoji"; "lng_settings_suggest_emoji" = "Suggest emoji replacements"; "lng_settings_suggest_by_emoji" = "Suggest popular stickers by emoji"; +"lng_settings_loop_stickers" = "Loop animated stickers"; +"lng_settings_large_emoji" = "Large emoji"; "lng_settings_view_emojis" = "View list"; "lng_settings_send_enter" = "Send by Enter"; "lng_settings_send_ctrlenter" = "Send by Ctrl+Enter"; @@ -395,7 +397,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_settings_performance" = "Performance"; "lng_settings_enable_animations" = "Enable animations"; "lng_settings_autoplay_gifs" = "Autoplay GIFs"; -"lng_settings_loop_stickers" = "Loop animated stickers"; "lng_backgrounds_header" = "Choose your new chat background"; "lng_theme_sure_keep" = "Keep this theme?"; diff --git a/Telegram/SourceFiles/boxes/add_contact_box.cpp b/Telegram/SourceFiles/boxes/add_contact_box.cpp index f8cc529d3..4bb30b2a9 100644 --- a/Telegram/SourceFiles/boxes/add_contact_box.cpp +++ b/Telegram/SourceFiles/boxes/add_contact_box.cpp @@ -419,10 +419,12 @@ void GroupInfoBox::prepare() { _initialTitle); _title->setMaxLength(kMaxGroupChannelTitle); _title->setInstantReplaces(Ui::InstantReplaces::Default()); - _title->setInstantReplacesEnabled(Global::ReplaceEmojiValue()); + _title->setInstantReplacesEnabled( + _navigation->session().settings().replaceEmojiValue()); Ui::Emoji::SuggestionsController::Init( getDelegate()->outerContainer(), - _title); + _title, + &_navigation->session()); if (_type != Type::Group) { _description.create( @@ -434,7 +436,7 @@ void GroupInfoBox::prepare() { _description->setMaxLength(kMaxChannelDescription); _description->setInstantReplaces(Ui::InstantReplaces::Default()); _description->setInstantReplacesEnabled( - Global::ReplaceEmojiValue()); + _navigation->session().settings().replaceEmojiValue()); connect(_description, &Ui::InputField::resized, [=] { descriptionResized(); }); connect(_description, &Ui::InputField::submitted, [=] { submit(); }); @@ -442,7 +444,8 @@ void GroupInfoBox::prepare() { Ui::Emoji::SuggestionsController::Init( getDelegate()->outerContainer(), - _description); + _description, + &_navigation->session()); } connect(_title, &Ui::InputField::submitted, [=] { submitName(); }); diff --git a/Telegram/SourceFiles/boxes/create_poll_box.cpp b/Telegram/SourceFiles/boxes/create_poll_box.cpp index a152abc3a..493b60c89 100644 --- a/Telegram/SourceFiles/boxes/create_poll_box.cpp +++ b/Telegram/SourceFiles/boxes/create_poll_box.cpp @@ -16,6 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/widgets/shadow.h" #include "ui/widgets/labels.h" #include "ui/widgets/buttons.h" +#include "main/main_session.h" #include "core/event_filter.h" #include "chat_helpers/emoji_suggestions_widget.h" #include "settings/settings_common.h" @@ -36,7 +37,8 @@ class Options { public: Options( not_null outer, - not_null container); + not_null container, + not_null session); [[nodiscard]] bool isValid() const; [[nodiscard]] rpl::producer isValidChanged() const; @@ -53,6 +55,7 @@ private: static Option Create( not_null outer, not_null container, + not_null session, int position); void toggleRemoveAlways(bool toggled); @@ -122,6 +125,7 @@ private: not_null _outer; not_null _container; + const not_null _session; int _position = 0; std::vector