/* This file is part of Telegram Desktop, the official desktop version of Telegram messaging app, see https://telegram.org Telegram Desktop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org */ #include "info/profile/info_profile_actions.h" #include #include #include "data/data_peer_values.h" #include "ui/wrap/vertical_layout.h" #include "ui/wrap/padding_wrap.h" #include "ui/wrap/slide_wrap.h" #include "ui/widgets/shadow.h" #include "ui/widgets/labels.h" #include "ui/toast/toast.h" #include "boxes/abstract_box.h" #include "boxes/confirm_box.h" #include "boxes/peer_list_box.h" #include "boxes/peer_list_controllers.h" #include "boxes/add_contact_box.h" #include "boxes/report_box.h" #include "lang/lang_keys.h" #include "info/info_controller.h" #include "info/info_top_bar_override.h" #include "info/profile/info_profile_icon.h" #include "info/profile/info_profile_values.h" #include "info/profile/info_profile_button.h" #include "info/profile/info_profile_text.h" #include "window/window_controller.h" #include "window/window_peer_menu.h" #include "profile/profile_channel_controllers.h" #include "mainwidget.h" #include "auth_session.h" #include "messenger.h" #include "apiwrap.h" #include "application.h" #include "styles/style_info.h" #include "styles/style_boxes.h" namespace Info { namespace Profile { namespace { object_ptr CreateSkipWidget( not_null parent) { return Ui::CreateSkipWidget(parent, st::infoProfileSkip); } object_ptr> CreateSlideSkipWidget( not_null parent) { return Ui::CreateSlideSkipWidget(parent, st::infoProfileSkip); } template auto AddActionButton( not_null parent, Text &&text, ToggleOn &&toggleOn, Callback &&callback, const style::InfoProfileButton &st = st::infoSharedMediaButton) { auto result = parent->add(object_ptr>( parent, object_ptr