/* This file is part of Telegram Desktop, the official desktop application for the Telegram messaging service. For license and copyright information please follow this link: https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #include "boxes/peers/edit_peer_reactions.h" #include "boxes/reactions_settings_box.h" // AddReactionAnimatedIcon #include "data/data_message_reactions.h" #include "data/data_peer.h" #include "data/data_chat.h" #include "data/data_channel.h" #include "data/data_session.h" #include "main/main_session.h" #include "apiwrap.h" #include "lang/lang_keys.h" #include "ui/layers/generic_box.h" #include "ui/widgets/buttons.h" #include "ui/widgets/checkbox.h" #include "ui/wrap/slide_wrap.h" #include "settings/settings_common.h" #include "window/window_session_controller.h" #include "styles/style_settings.h" #include "styles/style_info.h" void EditAllowedReactionsBox( not_null box, not_null navigation, bool isGroup, const std::vector &list, const Data::AllowedReactions &allowed, Fn callback) { using namespace Data; using namespace rpl::mappers; const auto iconHeight = st::editPeerReactionsPreview; box->setTitle(tr::lng_manage_peer_reactions()); enum class Option { All, Some, None, }; struct State { base::flat_map> toggles; rpl::variable