mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Rename Window::Controller to Window::SessionController.
This commit is contained in:
parent
263bbf1788
commit
a547f80ae9
123 changed files with 445 additions and 415 deletions
|
@ -40,7 +40,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "boxes/sticker_set_box.h"
|
||||
#include "window/notifications_manager.h"
|
||||
#include "window/window_lock_widgets.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "window/themes/window_theme.h"
|
||||
#include "inline_bots/inline_bot_result.h"
|
||||
#include "chat_helpers/message_field.h"
|
||||
|
@ -442,7 +442,7 @@ void ApiWrap::importChatInvite(const QString &hash) {
|
|||
return PeerId(0);
|
||||
});
|
||||
if (const auto peer = _session->data().peerLoaded(peerId)) {
|
||||
App::wnd()->controller()->showPeerHistory(
|
||||
App::wnd()->sessionController()->showPeerHistory(
|
||||
peer,
|
||||
Window::SectionShow::Way::Forward);
|
||||
}
|
||||
|
@ -3903,7 +3903,7 @@ void ApiWrap::jumpToHistoryDate(not_null<PeerData*> peer, const QDate &date) {
|
|||
//void ApiWrap::jumpToFeedDate(not_null<Data::Feed*> feed, const QDate &date) {
|
||||
// requestMessageAfterDate(feed, date, [=](Data::MessagePosition result) {
|
||||
// Ui::hideLayer();
|
||||
// App::wnd()->controller()->showSection(
|
||||
// App::wnd()->sessionController()->showSection(
|
||||
// HistoryFeed::Memento(feed, result));
|
||||
// });
|
||||
//}
|
||||
|
|
|
@ -22,7 +22,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/image/image.h"
|
||||
#include "ui/empty_userpic.h"
|
||||
#include "core/click_handler_types.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "storage/localstorage.h"
|
||||
#include "data/data_session.h"
|
||||
#include "data/data_photo.h"
|
||||
|
@ -712,7 +712,7 @@ void DeleteMessagesBox::deleteAndClear() {
|
|||
if (justClear) {
|
||||
peer->session().api().clearHistory(peer, revoke);
|
||||
} else {
|
||||
const auto controller = App::wnd()->controller();
|
||||
const auto controller = App::wnd()->sessionController();
|
||||
if (controller->activeChatCurrent().peer() == peer) {
|
||||
Ui::showChatsList();
|
||||
}
|
||||
|
|
|
@ -34,13 +34,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/special_buttons.h"
|
||||
#include "ui/text_options.h"
|
||||
#include "ui/widgets/input_fields.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "ui/widgets/checkbox.h"
|
||||
#include "confirm_box.h"
|
||||
|
||||
EditCaptionBox::EditCaptionBox(
|
||||
QWidget*,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<HistoryItem*> item)
|
||||
: _controller(controller)
|
||||
, _msgId(item->fullId()) {
|
||||
|
|
|
@ -17,7 +17,7 @@ class TabbedPanel;
|
|||
} // namespace ChatHelpers
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace Data {
|
||||
|
@ -32,14 +32,14 @@ class Checkbox;
|
|||
} // namespace Ui
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
class EditCaptionBox : public BoxContent, public RPCSender {
|
||||
public:
|
||||
EditCaptionBox(
|
||||
QWidget*,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<HistoryItem*> item);
|
||||
|
||||
protected:
|
||||
|
@ -80,7 +80,7 @@ private:
|
|||
: _preparedList.files.front().path;
|
||||
}
|
||||
|
||||
not_null<Window::Controller*> _controller;
|
||||
not_null<Window::SessionController*> _controller;
|
||||
FullMsgId _msgId;
|
||||
Image *_thumbnailImage = nullptr;
|
||||
bool _thumbnailImageLoaded = false;
|
||||
|
|
|
@ -20,7 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "auth_session.h"
|
||||
#include "mainwidget.h"
|
||||
#include "mainwindow.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "apiwrap.h"
|
||||
#include "observer_peer.h"
|
||||
|
||||
|
@ -222,7 +222,7 @@ void AddParticipantsBoxController::Start(
|
|||
box->boxClosing() | rpl::start_with_next([=] {
|
||||
auto params = Window::SectionShow();
|
||||
params.activation = anim::activation::background;
|
||||
App::wnd()->controller()->showPeerHistory(
|
||||
App::wnd()->sessionController()->showPeerHistory(
|
||||
channel,
|
||||
params,
|
||||
ShowAtTheEndMsgId);
|
||||
|
|
|
@ -24,7 +24,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "data/data_chat.h"
|
||||
#include "data/data_user.h"
|
||||
#include "ui/widgets/popup_menu.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "history/history.h"
|
||||
|
||||
namespace {
|
||||
|
@ -706,7 +706,7 @@ ParticipantsBoxController::SavedState::SavedState(
|
|||
}
|
||||
|
||||
ParticipantsBoxController::ParticipantsBoxController(
|
||||
not_null<Window::Navigation*> navigation,
|
||||
not_null<Window::SessionNavigation*> navigation,
|
||||
not_null<PeerData*> peer,
|
||||
Role role)
|
||||
: PeerListController(CreateSearchController(peer, role, &_additional))
|
||||
|
@ -775,7 +775,7 @@ auto ParticipantsBoxController::CreateSearchController(
|
|||
}
|
||||
|
||||
void ParticipantsBoxController::Start(
|
||||
not_null<Window::Navigation*> navigation,
|
||||
not_null<Window::SessionNavigation*> navigation,
|
||||
not_null<PeerData*> peer,
|
||||
Role role) {
|
||||
auto controller = std::make_unique<ParticipantsBoxController>(
|
||||
|
|
|
@ -15,7 +15,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "info/profile/info_profile_members_controllers.h"
|
||||
|
||||
namespace Window {
|
||||
class Navigation;
|
||||
class SessionNavigation;
|
||||
} // namespace Window
|
||||
|
||||
Fn<void(
|
||||
|
@ -135,12 +135,12 @@ public:
|
|||
using Role = ParticipantsRole;
|
||||
|
||||
static void Start(
|
||||
not_null<Window::Navigation*> navigation,
|
||||
not_null<Window::SessionNavigation*> navigation,
|
||||
not_null<PeerData*> peer,
|
||||
Role role);
|
||||
|
||||
ParticipantsBoxController(
|
||||
not_null<Window::Navigation*> navigation,
|
||||
not_null<Window::SessionNavigation*> navigation,
|
||||
not_null<PeerData*> peer,
|
||||
Role role);
|
||||
|
||||
|
@ -227,7 +227,7 @@ private:
|
|||
void subscribeToMigration();
|
||||
void migrate(not_null<ChannelData*> channel);
|
||||
|
||||
not_null<Window::Navigation*> _navigation;
|
||||
not_null<Window::SessionNavigation*> _navigation;
|
||||
not_null<PeerData*> _peer;
|
||||
Role _role = Role::Admins;
|
||||
int _offset = 0;
|
||||
|
|
|
@ -42,7 +42,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/wrap/padding_wrap.h"
|
||||
#include "ui/wrap/slide_wrap.h"
|
||||
#include "ui/wrap/vertical_layout.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include <rpl/flatten_latest.h>
|
||||
#include <rpl/range.h>
|
||||
#include "info/profile/info_profile_icon.h"
|
||||
|
@ -718,7 +718,7 @@ void Controller::fillHistoryVisibilityButton() {
|
|||
void Controller::fillManageSection() {
|
||||
Expects(_controls.buttonsLayout != nullptr);
|
||||
|
||||
const auto navigation = App::wnd()->controller();
|
||||
const auto navigation = App::wnd()->sessionController();
|
||||
|
||||
const auto chat = _peer->asChat();
|
||||
const auto channel = _peer->asChannel();
|
||||
|
|
|
@ -19,7 +19,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "info/profile/info_profile_values.h"
|
||||
#include "boxes/peers/edit_participants_box.h"
|
||||
#include "boxes/peers/edit_peer_info_box.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "mainwindow.h"
|
||||
#include "styles/style_boxes.h"
|
||||
#include "styles/style_info.h"
|
||||
|
@ -356,7 +356,7 @@ void EditPeerPermissionsBox::addBannedButtons(
|
|||
object_ptr<BoxContentDivider>(container),
|
||||
{ 0, st::infoProfileSkip, 0, st::infoProfileSkip });
|
||||
|
||||
const auto navigation = App::wnd()->controller();
|
||||
const auto navigation = App::wnd()->sessionController();
|
||||
container->add(EditPeerInfoBox::CreateButton(
|
||||
container,
|
||||
Lang::Viewer(lng_manage_peer_exceptions),
|
||||
|
|
|
@ -36,7 +36,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/wrap/padding_wrap.h"
|
||||
#include "ui/wrap/slide_wrap.h"
|
||||
#include "ui/wrap/vertical_layout.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include <rpl/flatten_latest.h>
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -29,7 +29,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/special_buttons.h"
|
||||
#include "data/data_document.h"
|
||||
#include "media/clip/media_clip_reader.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "layout.h"
|
||||
#include "styles/style_history.h"
|
||||
#include "styles/style_boxes.h"
|
||||
|
@ -46,12 +46,12 @@ class SingleMediaPreview : public Ui::RpWidget {
|
|||
public:
|
||||
static SingleMediaPreview *Create(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
const Storage::PreparedFile &file);
|
||||
|
||||
SingleMediaPreview(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
QImage preview,
|
||||
bool animated,
|
||||
bool sticker,
|
||||
|
@ -73,7 +73,7 @@ private:
|
|||
void prepareAnimatedPreview(const QString &animatedPreviewPath);
|
||||
void clipCallback(Media::Clip::Notification notification);
|
||||
|
||||
not_null<Window::Controller*> _controller;
|
||||
not_null<Window::SessionController*> _controller;
|
||||
bool _animated = false;
|
||||
bool _sticker = false;
|
||||
bool _canSendAsPhoto = false;
|
||||
|
@ -568,7 +568,7 @@ void AlbumThumb::finishAnimations() {
|
|||
|
||||
SingleMediaPreview *SingleMediaPreview::Create(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
const Storage::PreparedFile &file) {
|
||||
auto preview = QImage();
|
||||
bool animated = false;
|
||||
|
@ -602,7 +602,7 @@ SingleMediaPreview *SingleMediaPreview::Create(
|
|||
|
||||
SingleMediaPreview::SingleMediaPreview(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
QImage preview,
|
||||
bool animated,
|
||||
bool sticker,
|
||||
|
@ -1337,7 +1337,7 @@ void SendFilesBox::AlbumPreview::mouseReleaseEvent(QMouseEvent *e) {
|
|||
|
||||
SendFilesBox::SendFilesBox(
|
||||
QWidget*,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
Storage::PreparedList &&list,
|
||||
const TextWithTags &caption,
|
||||
CompressConfirm compressed)
|
||||
|
|
|
@ -13,7 +13,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "storage/storage_media_prepare.h"
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace ChatHelpers {
|
||||
|
@ -32,7 +32,7 @@ class EmojiButton;
|
|||
} // namespace Ui
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
enum class SendFilesWay {
|
||||
|
@ -45,7 +45,7 @@ class SendFilesBox : public BoxContent {
|
|||
public:
|
||||
SendFilesBox(
|
||||
QWidget*,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
Storage::PreparedList &&list,
|
||||
const TextWithTags &caption,
|
||||
CompressConfirm compressed);
|
||||
|
@ -107,7 +107,7 @@ private:
|
|||
bool canAddUrls(const QList<QUrl> &urls) const;
|
||||
bool addFiles(not_null<const QMimeData*> data);
|
||||
|
||||
not_null<Window::Controller*> _controller;
|
||||
not_null<Window::SessionController*> _controller;
|
||||
|
||||
QString _titleText;
|
||||
int _titleHeight = 0;
|
||||
|
|
|
@ -379,7 +379,7 @@ void EmojiColorPicker::drawVariant(Painter &p, int variant) {
|
|||
|
||||
EmojiListWidget::EmojiListWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller)
|
||||
not_null<Window::SessionController*> controller)
|
||||
: Inner(parent, controller)
|
||||
, _picker(this)
|
||||
, _showPickerTimer([=] { showPicker(); }) {
|
||||
|
|
|
@ -18,7 +18,7 @@ enum class Section;
|
|||
} // namespace Ui
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace ChatHelpers {
|
||||
|
@ -33,7 +33,7 @@ class EmojiListWidget
|
|||
public:
|
||||
EmojiListWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller);
|
||||
not_null<Window::SessionController*> controller);
|
||||
|
||||
using Section = Ui::Emoji::Section;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "storage/localstorage.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "mainwindow.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "history/view/history_view_cursor_state.h"
|
||||
|
||||
namespace ChatHelpers {
|
||||
|
@ -124,7 +124,7 @@ void GifsListWidget::Footer::processPanelHideFinished() {
|
|||
|
||||
GifsListWidget::GifsListWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller)
|
||||
not_null<Window::SessionController*> controller)
|
||||
: Inner(parent, controller)
|
||||
, _section(Section::Gifs)
|
||||
, _updateInlineItems([=] { updateInlineItems(); })
|
||||
|
@ -133,7 +133,11 @@ GifsListWidget::GifsListWidget(
|
|||
setAttribute(Qt::WA_OpaquePaintEvent);
|
||||
|
||||
_inlineRequestTimer.setSingleShot(true);
|
||||
connect(&_inlineRequestTimer, &QTimer::timeout, this, [this] { sendInlineRequest(); });
|
||||
connect(
|
||||
&_inlineRequestTimer,
|
||||
&QTimer::timeout,
|
||||
this,
|
||||
[=] { sendInlineRequest(); });
|
||||
|
||||
Auth().data().savedGifsUpdated(
|
||||
) | rpl::start_with_next([this] {
|
||||
|
@ -142,8 +146,9 @@ GifsListWidget::GifsListWidget(
|
|||
subscribe(Auth().downloaderTaskFinished(), [this] {
|
||||
update();
|
||||
});
|
||||
subscribe(controller->gifPauseLevelChanged(), [this] {
|
||||
if (!this->controller()->isGifPausedAtLeastFor(Window::GifPauseReason::SavedGifs)) {
|
||||
subscribe(controller->gifPauseLevelChanged(), [=] {
|
||||
if (!controller->isGifPausedAtLeastFor(
|
||||
Window::GifPauseReason::SavedGifs)) {
|
||||
update();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -23,7 +23,7 @@ class RoundButton;
|
|||
} // namespace Ui
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace ChatHelpers {
|
||||
|
@ -36,7 +36,7 @@ class GifsListWidget
|
|||
public:
|
||||
using InlineChosen = TabbedSelector::InlineChosen;
|
||||
|
||||
GifsListWidget(QWidget *parent, not_null<Window::Controller*> controller);
|
||||
GifsListWidget(QWidget *parent, not_null<Window::SessionController*> controller);
|
||||
|
||||
rpl::producer<not_null<DocumentData*>> fileChosen() const;
|
||||
rpl::producer<not_null<PhotoData*>> photoChosen() const;
|
||||
|
|
|
@ -17,7 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "data/data_session.h"
|
||||
#include "data/data_user.h"
|
||||
#include "chat_helpers/emoji_suggestions_widget.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "mainwindow.h"
|
||||
#include "auth_session.h"
|
||||
|
@ -353,9 +353,8 @@ Fn<bool(
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
void InitMessageField(
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<Ui::InputField*> field) {
|
||||
field->setMinHeight(st::historySendSize.height() - 2 * st::historySendPadding);
|
||||
field->setMaxHeight(st::historyComposeFieldMaxHeight);
|
||||
|
|
|
@ -11,8 +11,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "base/timer.h"
|
||||
|
||||
class HistoryWidget;
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
QString ConvertTagToMimeTag(const QString &tagId);
|
||||
|
@ -34,7 +35,7 @@ Fn<bool(
|
|||
Ui::InputField::EditLinkAction action)> DefaultEditLinkCallback(
|
||||
not_null<Ui::InputField*> field);
|
||||
void InitMessageField(
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<Ui::InputField*> field);
|
||||
bool HasSendText(not_null<const Ui::InputField*> field);
|
||||
|
||||
|
|
|
@ -697,7 +697,10 @@ bool StickersListWidget::Footer::iconsAnimationCallback(crl::time now) {
|
|||
return (_iconsStartAnim != 0);
|
||||
}
|
||||
|
||||
StickersListWidget::StickersListWidget(QWidget *parent, not_null<Window::Controller*> controller) : Inner(parent, controller)
|
||||
StickersListWidget::StickersListWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::SessionController*> controller)
|
||||
: Inner(parent, controller)
|
||||
, _section(Section::Stickers)
|
||||
, _megagroupSetAbout(st::columnMinimalWidthThird - st::emojiScroll.width - st::emojiPanHeaderLeft)
|
||||
, _addText(lang(lng_stickers_featured_add).toUpper())
|
||||
|
|
|
@ -13,7 +13,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "base/timer.h"
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace Ui {
|
||||
|
@ -32,7 +32,7 @@ class StickersListWidget
|
|||
public:
|
||||
StickersListWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller);
|
||||
not_null<Window::SessionController*> controller);
|
||||
|
||||
rpl::producer<not_null<DocumentData*>> chosen() const;
|
||||
rpl::producer<> scrollUpdated() const;
|
||||
|
|
|
@ -10,7 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/widgets/shadow.h"
|
||||
#include "ui/image/image_prepare.h"
|
||||
#include "chat_helpers/tabbed_selector.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "mainwindow.h"
|
||||
#include "core/application.h"
|
||||
#include "core/qt_signal_producer.h"
|
||||
|
@ -26,7 +26,7 @@ constexpr auto kDelayedHideTimeoutMs = 3000;
|
|||
|
||||
TabbedPanel::TabbedPanel(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller)
|
||||
not_null<Window::SessionController*> controller)
|
||||
: TabbedPanel(
|
||||
parent,
|
||||
controller,
|
||||
|
@ -35,7 +35,7 @@ TabbedPanel::TabbedPanel(
|
|||
|
||||
TabbedPanel::TabbedPanel(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
object_ptr<TabbedSelector> selector)
|
||||
: RpWidget(parent)
|
||||
, _controller(controller)
|
||||
|
|
|
@ -12,7 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "base/timer.h"
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace Ui {
|
||||
|
@ -25,10 +25,10 @@ class TabbedSelector;
|
|||
|
||||
class TabbedPanel : public Ui::RpWidget {
|
||||
public:
|
||||
TabbedPanel(QWidget *parent, not_null<Window::Controller*> controller);
|
||||
TabbedPanel(QWidget *parent, not_null<Window::SessionController*> controller);
|
||||
TabbedPanel(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
object_ptr<TabbedSelector> selector);
|
||||
|
||||
object_ptr<TabbedSelector> takeSelector();
|
||||
|
@ -87,7 +87,7 @@ private:
|
|||
bool preventAutoHide() const;
|
||||
void updateContentHeight();
|
||||
|
||||
not_null<Window::Controller*> _controller;
|
||||
not_null<Window::SessionController*> _controller;
|
||||
object_ptr<TabbedSelector> _selector;
|
||||
|
||||
int _contentMaxHeight = 0;
|
||||
|
|
|
@ -21,7 +21,7 @@ TabbedMemento::TabbedMemento(
|
|||
|
||||
object_ptr<Window::SectionWidget> TabbedMemento::createWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
Window::Column column,
|
||||
const QRect &geometry) {
|
||||
auto result = object_ptr<TabbedSection>(
|
||||
|
@ -41,7 +41,7 @@ TabbedMemento::~TabbedMemento() {
|
|||
|
||||
TabbedSection::TabbedSection(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller)
|
||||
not_null<Window::SessionController*> controller)
|
||||
: TabbedSection(
|
||||
parent,
|
||||
controller,
|
||||
|
@ -51,7 +51,7 @@ TabbedSection::TabbedSection(
|
|||
|
||||
TabbedSection::TabbedSection(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
object_ptr<TabbedSelector> selector,
|
||||
Fn<void(object_ptr<TabbedSelector>)> returnMethod)
|
||||
: Window::SectionWidget(parent, controller)
|
||||
|
|
|
@ -24,7 +24,7 @@ public:
|
|||
|
||||
object_ptr<Window::SectionWidget> createWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
Window::Column column,
|
||||
const QRect &geometry) override;
|
||||
|
||||
|
@ -40,10 +40,10 @@ class TabbedSection : public Window::SectionWidget {
|
|||
public:
|
||||
TabbedSection(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller);
|
||||
not_null<Window::SessionController*> controller);
|
||||
TabbedSection(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
object_ptr<TabbedSelector> selector,
|
||||
Fn<void(object_ptr<TabbedSelector>)> returnMethod);
|
||||
|
||||
|
|
|
@ -276,7 +276,7 @@ void TabbedSelector::Tab::saveScrollTop() {
|
|||
|
||||
TabbedSelector::TabbedSelector(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
Mode mode)
|
||||
: RpWidget(parent)
|
||||
, _mode(mode)
|
||||
|
@ -368,7 +368,7 @@ TabbedSelector::TabbedSelector(
|
|||
showAll();
|
||||
}
|
||||
|
||||
TabbedSelector::Tab TabbedSelector::createTab(SelectorTab type, not_null<Window::Controller*> controller) {
|
||||
TabbedSelector::Tab TabbedSelector::createTab(SelectorTab type, not_null<Window::SessionController*> controller) {
|
||||
auto createWidget = [&]() -> object_ptr<Inner> {
|
||||
if (!full() && type != SelectorTab::Emoji) {
|
||||
return { nullptr };
|
||||
|
@ -872,7 +872,7 @@ void TabbedSelector::scrollToY(int y) {
|
|||
|
||||
TabbedSelector::Inner::Inner(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller)
|
||||
not_null<Window::SessionController*> controller)
|
||||
: RpWidget(parent)
|
||||
, _controller(controller) {
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ class FlatLabel;
|
|||
} // namesapce Ui
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace ChatHelpers {
|
||||
|
@ -53,7 +53,7 @@ public:
|
|||
|
||||
TabbedSelector(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
Mode mode = Mode::Full);
|
||||
|
||||
rpl::producer<EmojiPtr> emojiChosen() const;
|
||||
|
@ -148,7 +148,7 @@ private:
|
|||
bool full() const;
|
||||
Tab createTab(
|
||||
SelectorTab type,
|
||||
not_null<Window::Controller*> controller);
|
||||
not_null<Window::SessionController*> controller);
|
||||
|
||||
void paintSlideFrame(Painter &p);
|
||||
void paintContent(Painter &p);
|
||||
|
@ -212,7 +212,7 @@ private:
|
|||
|
||||
class TabbedSelector::Inner : public Ui::RpWidget {
|
||||
public:
|
||||
Inner(QWidget *parent, not_null<Window::Controller*> controller);
|
||||
Inner(QWidget *parent, not_null<Window::SessionController*> controller);
|
||||
|
||||
int getVisibleTop() const {
|
||||
return _visibleTop;
|
||||
|
@ -246,7 +246,7 @@ protected:
|
|||
int minimalHeight() const;
|
||||
int resizeGetHeight(int newWidth) override final;
|
||||
|
||||
not_null<Window::Controller*> controller() const {
|
||||
not_null<Window::SessionController*> controller() const {
|
||||
return _controller;
|
||||
}
|
||||
|
||||
|
@ -261,7 +261,7 @@ protected:
|
|||
void disableScroll(bool disabled);
|
||||
|
||||
private:
|
||||
not_null<Window::Controller*> _controller;
|
||||
not_null<Window::SessionController*> _controller;
|
||||
|
||||
int _visibleTop = 0;
|
||||
int _visibleBottom = 0;
|
||||
|
|
|
@ -52,7 +52,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/emoji_config.h"
|
||||
#include "ui/effects/animations.h"
|
||||
#include "storage/serialize_common.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "base/qthelp_regex.h"
|
||||
#include "base/qthelp_url.h"
|
||||
#include "boxes/connection_box.h"
|
||||
|
|
|
@ -20,7 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "boxes/connection_box.h"
|
||||
#include "boxes/sticker_set_box.h"
|
||||
#include "passport/passport_form_controller.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "data/data_session.h"
|
||||
#include "data/data_channel.h"
|
||||
#include "mainwindow.h"
|
||||
|
@ -46,7 +46,7 @@ bool JoinGroupByHash(const Match &match, const QVariant &context) {
|
|||
}));
|
||||
}, [=](const MTPDchatInviteAlready &data) {
|
||||
if (const auto chat = Auth().data().processChat(data.vchat)) {
|
||||
App::wnd()->controller()->showPeerHistory(
|
||||
App::wnd()->sessionController()->showPeerHistory(
|
||||
chat,
|
||||
Window::SectionShow::Way::Forward);
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ bool ShowPassportForm(const QMap<QString, QString> ¶ms) {
|
|||
QString());
|
||||
const auto errors = params.value("errors", QString());
|
||||
if (const auto window = App::wnd()) {
|
||||
if (const auto controller = window->controller()) {
|
||||
if (const auto controller = window->sessionController()) {
|
||||
controller->showPassportForm(Passport::FormRequest(
|
||||
botId,
|
||||
scope,
|
||||
|
@ -240,7 +240,7 @@ bool ResolvePrivatePost(const Match &match, const QVariant &context) {
|
|||
return false;
|
||||
}
|
||||
const auto done = [=](not_null<PeerData*> peer) {
|
||||
App::wnd()->controller()->showPeerHistory(
|
||||
App::wnd()->sessionController()->showPeerHistory(
|
||||
peer->id,
|
||||
Window::SectionShow::Way::Forward,
|
||||
msgId);
|
||||
|
|
|
@ -16,7 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "core/click_handler_types.h"
|
||||
#include "info/info_memento.h"
|
||||
#include "info/settings/info_settings_widget.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "settings/settings_intro.h"
|
||||
|
||||
extern "C" {
|
||||
|
@ -1577,7 +1577,7 @@ void UpdateApplication() {
|
|||
} else {
|
||||
cSetAutoUpdate(true);
|
||||
if (const auto window = App::wnd()) {
|
||||
if (const auto controller = window->controller()) {
|
||||
if (const auto controller = window->sessionController()) {
|
||||
controller->showSection(
|
||||
Info::Memento(
|
||||
Info::Settings::Tag{ Auth().user() },
|
||||
|
|
|
@ -24,7 +24,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "platform/platform_specific.h"
|
||||
#include "history/history.h"
|
||||
#include "history/history_item.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "storage/cache/storage_cache_database.h"
|
||||
#include "boxes/confirm_box.h"
|
||||
#include "ui/image/image.h"
|
||||
|
|
|
@ -20,7 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "auth_session.h"
|
||||
#include "core/application.h"
|
||||
#include "mainwindow.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "ui/image/image.h"
|
||||
#include "ui/empty_userpic.h"
|
||||
#include "ui/text_options.h"
|
||||
|
@ -77,7 +77,7 @@ PeerClickHandler::PeerClickHandler(not_null<PeerData*> peer)
|
|||
|
||||
void PeerClickHandler::onClick(ClickContext context) const {
|
||||
if (context.button == Qt::LeftButton && App::wnd()) {
|
||||
auto controller = App::wnd()->controller();
|
||||
const auto controller = App::wnd()->sessionController();
|
||||
if (_peer
|
||||
&& _peer->isChannel()
|
||||
&& controller->activeChatCurrent().peer() != _peer) {
|
||||
|
|
|
@ -20,7 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "data/data_session.h"
|
||||
#include "info/info_memento.h"
|
||||
#include "info/info_controller.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "mainwindow.h"
|
||||
#include "core/crash_reports.h"
|
||||
|
||||
|
@ -47,7 +47,7 @@ void SharedMediaShowOverview(
|
|||
Storage::SharedMediaType type,
|
||||
not_null<History*> history) {
|
||||
if (SharedMediaOverviewType(type)) {
|
||||
App::wnd()->controller()->showSection(Info::Memento(
|
||||
App::wnd()->sessionController()->showSection(Info::Memento(
|
||||
history->peer->id,
|
||||
Info::Section(type)));
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "chat_helpers/stickers.h"
|
||||
#include "auth_session.h"
|
||||
#include "window/notifications_manager.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "window/window_peer_menu.h"
|
||||
#include "ui/widgets/multi_select.h"
|
||||
#include "ui/empty_userpic.h"
|
||||
|
@ -98,7 +98,7 @@ struct InnerWidget::PeerSearchResult {
|
|||
|
||||
InnerWidget::InnerWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller)
|
||||
not_null<Window::SessionController*> controller)
|
||||
: RpWidget(parent)
|
||||
, _controller(controller)
|
||||
, _pinnedShiftAnimation([=](crl::time now) {
|
||||
|
|
|
@ -22,7 +22,7 @@ class LinkButton;
|
|||
} // namespace Ui
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace Dialogs {
|
||||
|
@ -58,7 +58,9 @@ class InnerWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
InnerWidget(QWidget *parent, not_null<Window::Controller*> controller);
|
||||
InnerWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::SessionController*> controller);
|
||||
|
||||
bool searchReceived(
|
||||
const QVector<MTPMessage> &result,
|
||||
|
@ -291,7 +293,7 @@ private:
|
|||
bool pinnedShiftAnimationCallback(crl::time now);
|
||||
void handleChatMigration(not_null<ChatData*> chat);
|
||||
|
||||
not_null<Window::Controller*> _controller;
|
||||
not_null<Window::SessionController*> _controller;
|
||||
|
||||
Mode _mode = Mode();
|
||||
bool _mouseSelection = false;
|
||||
|
|
|
@ -19,7 +19,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
namespace Dialogs {
|
||||
|
||||
void ShowSearchFromBox(
|
||||
not_null<Window::Navigation*> navigation,
|
||||
not_null<Window::SessionNavigation*> navigation,
|
||||
not_null<PeerData*> peer,
|
||||
Fn<void(not_null<UserData*>)> callback,
|
||||
Fn<void()> closedCallback) {
|
||||
|
@ -50,7 +50,7 @@ void ShowSearchFromBox(
|
|||
}
|
||||
|
||||
SearchFromController::SearchFromController(
|
||||
not_null<Window::Navigation*> navigation,
|
||||
not_null<Window::SessionNavigation*> navigation,
|
||||
not_null<PeerData*> peer,
|
||||
Fn<void(not_null<UserData*>)> callback)
|
||||
: ParticipantsBoxController(
|
||||
|
|
|
@ -13,7 +13,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
namespace Dialogs {
|
||||
|
||||
void ShowSearchFromBox(
|
||||
not_null<Window::Navigation*> navigation,
|
||||
not_null<Window::SessionNavigation*> navigation,
|
||||
not_null<PeerData*> peer,
|
||||
Fn<void(not_null<UserData*>)> callback,
|
||||
Fn<void()> closedCallback);
|
||||
|
@ -21,7 +21,7 @@ void ShowSearchFromBox(
|
|||
class SearchFromController : public ParticipantsBoxController {
|
||||
public:
|
||||
SearchFromController(
|
||||
not_null<Window::Navigation*> navigation,
|
||||
not_null<Window::SessionNavigation*> navigation,
|
||||
not_null<PeerData*> peer,
|
||||
Fn<void(not_null<UserData*>)> callback);
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "core/update_checker.h"
|
||||
#include "boxes/peer_list_box.h"
|
||||
#include "boxes/peers/edit_participants_box.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "window/window_slide_animation.h"
|
||||
#include "window/window_connecting_widget.h"
|
||||
#include "storage/storage_media_prepare.h"
|
||||
|
@ -150,7 +150,9 @@ void Widget::BottomButton::paintEvent(QPaintEvent *e) {
|
|||
}
|
||||
}
|
||||
|
||||
Widget::Widget(QWidget *parent, not_null<Window::Controller*> controller)
|
||||
Widget::Widget(
|
||||
QWidget *parent,
|
||||
not_null<Window::SessionController*> controller)
|
||||
: Window::AbstractSectionWidget(parent, controller)
|
||||
, _searchControls(this)
|
||||
, _mainMenuToggle(_searchControls, st::dialogsMenuToggle)
|
||||
|
@ -1276,7 +1278,7 @@ void Widget::clearSearchCache() {
|
|||
|
||||
void Widget::showJumpToDate() {
|
||||
if (_searchInChat) {
|
||||
this->controller()->showJumpToDate(_searchInChat, QDate());
|
||||
controller()->showJumpToDate(_searchInChat, QDate());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ class FadeWrapScaled;
|
|||
} // namespace Ui
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
class ConnectionState;
|
||||
} // namespace Window
|
||||
|
||||
|
@ -49,7 +49,7 @@ class Widget : public Window::AbstractSectionWidget, public RPCSender {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Widget(QWidget *parent, not_null<Window::Controller*> controller);
|
||||
Widget(QWidget *parent, not_null<Window::SessionController*> controller);
|
||||
|
||||
void updateDragInScroll(bool inScroll);
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "core/click_handler_types.h"
|
||||
#include "core/application.h"
|
||||
#include "media/clip/media_clip_reader.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "history/history_item_components.h"
|
||||
#include "platform/platform_info.h"
|
||||
#include "data/data_peer.h"
|
||||
|
@ -227,8 +227,8 @@ bool isLayerShown() {
|
|||
}
|
||||
|
||||
void showPeerProfile(const PeerId &peer) {
|
||||
if (auto window = App::wnd()) {
|
||||
if (auto controller = window->controller()) {
|
||||
if (const auto window = App::wnd()) {
|
||||
if (const auto controller = window->sessionController()) {
|
||||
controller->showPeerInfo(peer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "core/application.h"
|
||||
#include "apiwrap.h"
|
||||
#include "layout.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "auth_session.h"
|
||||
#include "ui/widgets/popup_menu.h"
|
||||
#include "ui/image/image.h"
|
||||
|
@ -212,7 +212,7 @@ void InnerWidget::enumerateDates(Method method) {
|
|||
|
||||
InnerWidget::InnerWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<ChannelData*> channel)
|
||||
: RpWidget(parent)
|
||||
, _controller(controller)
|
||||
|
|
|
@ -29,7 +29,7 @@ class PopupMenu;
|
|||
} // namespace Ui
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace AdminLog {
|
||||
|
@ -45,7 +45,7 @@ class InnerWidget final
|
|||
public:
|
||||
InnerWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<ChannelData*> channel);
|
||||
|
||||
base::Observable<void> showSearchSignal;
|
||||
|
@ -207,7 +207,7 @@ private:
|
|||
template <typename Method>
|
||||
void enumerateDates(Method method);
|
||||
|
||||
not_null<Window::Controller*> _controller;
|
||||
not_null<Window::SessionController*> _controller;
|
||||
not_null<ChannelData*> _channel;
|
||||
not_null<History*> _history;
|
||||
std::vector<OwnedItem> _items;
|
||||
|
|
|
@ -20,7 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "mainwindow.h"
|
||||
#include "apiwrap.h"
|
||||
#include "window/themes/window_theme.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "boxes/confirm_box.h"
|
||||
#include "base/timer.h"
|
||||
#include "data/data_channel.h"
|
||||
|
@ -36,7 +36,7 @@ class FixedBar final : public TWidget, private base::Subscriber {
|
|||
public:
|
||||
FixedBar(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<ChannelData*> channel);
|
||||
|
||||
base::Observable<void> showFilterSignal;
|
||||
|
@ -70,7 +70,7 @@ private:
|
|||
void applySearch();
|
||||
void searchAnimationCallback();
|
||||
|
||||
not_null<Window::Controller*> _controller;
|
||||
not_null<Window::SessionController*> _controller;
|
||||
not_null<ChannelData*> _channel;
|
||||
object_ptr<Ui::FlatInput> _field;
|
||||
object_ptr<Profile::BackButton> _backButton;
|
||||
|
@ -87,7 +87,7 @@ private:
|
|||
|
||||
object_ptr<Window::SectionWidget> SectionMemento::createWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
Window::Column column,
|
||||
const QRect &geometry) {
|
||||
if (column == Window::Column::Third) {
|
||||
|
@ -100,7 +100,7 @@ object_ptr<Window::SectionWidget> SectionMemento::createWidget(
|
|||
|
||||
FixedBar::FixedBar(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<ChannelData*> channel) : TWidget(parent)
|
||||
, _controller(controller)
|
||||
, _channel(channel)
|
||||
|
@ -125,7 +125,9 @@ FixedBar::FixedBar(
|
|||
|
||||
void FixedBar::applyFilter(const FilterValue &value) {
|
||||
auto hasFilter = (value.flags != 0) || !value.allUsers;
|
||||
_backButton->setText(lang(hasFilter ? lng_admin_log_title_selected : lng_admin_log_title_all));
|
||||
_backButton->setText(lang(hasFilter
|
||||
? lng_admin_log_title_selected
|
||||
: lng_admin_log_title_all));
|
||||
}
|
||||
|
||||
void FixedBar::goBack() {
|
||||
|
@ -141,7 +143,11 @@ void FixedBar::showSearch() {
|
|||
void FixedBar::toggleSearch() {
|
||||
_searchShown = !_searchShown;
|
||||
_cancel->toggle(_searchShown, anim::type::normal);
|
||||
_searchShownAnimation.start([this] { searchAnimationCallback(); }, _searchShown ? 0. : 1., _searchShown ? 1. : 0., st::historyAdminLogSearchSlideDuration);
|
||||
_searchShownAnimation.start(
|
||||
[=] { searchAnimationCallback(); },
|
||||
_searchShown ? 0. : 1.,
|
||||
_searchShown ? 1. : 0.,
|
||||
st::historyAdminLogSearchSlideDuration);
|
||||
_search->setDisabled(_searchShown);
|
||||
if (_searchShown) {
|
||||
_field->show();
|
||||
|
@ -154,9 +160,13 @@ void FixedBar::toggleSearch() {
|
|||
void FixedBar::searchAnimationCallback() {
|
||||
if (!_searchShownAnimation.animating()) {
|
||||
_field->setVisible(_searchShown);
|
||||
_search->setIconOverride(_searchShown ? &st::topBarSearch.icon : nullptr, _searchShown ? &st::topBarSearch.icon : nullptr);
|
||||
_search->setRippleColorOverride(_searchShown ? &st::topBarBg : nullptr);
|
||||
_search->setCursor(_searchShown ? style::cur_default : style::cur_pointer);
|
||||
_search->setIconOverride(
|
||||
_searchShown ? &st::topBarSearch.icon : nullptr,
|
||||
_searchShown ? &st::topBarSearch.icon : nullptr);
|
||||
_search->setRippleColorOverride(
|
||||
_searchShown ? &st::topBarBg : nullptr);
|
||||
_search->setCursor(
|
||||
_searchShown ? style::cur_default : style::cur_pointer);
|
||||
}
|
||||
resizeToWidth(width());
|
||||
}
|
||||
|
@ -240,7 +250,7 @@ void FixedBar::mousePressEvent(QMouseEvent *e) {
|
|||
}
|
||||
}
|
||||
|
||||
Widget::Widget(QWidget *parent, not_null<Window::Controller*> controller, not_null<ChannelData*> channel) : Window::SectionWidget(parent, controller)
|
||||
Widget::Widget(QWidget *parent, not_null<Window::SessionController*> controller, not_null<ChannelData*> channel) : Window::SectionWidget(parent, controller)
|
||||
, _scroll(this, st::historyScroll, false)
|
||||
, _fixedBar(this, controller, channel)
|
||||
, _fixedBarShadow(this)
|
||||
|
|
|
@ -63,7 +63,7 @@ private:
|
|||
|
||||
class Widget final : public Window::SectionWidget {
|
||||
public:
|
||||
Widget(QWidget *parent, not_null<Window::Controller*> controller, not_null<ChannelData*> channel);
|
||||
Widget(QWidget *parent, not_null<Window::SessionController*> controller, not_null<ChannelData*> channel);
|
||||
|
||||
not_null<ChannelData*> channel() const;
|
||||
Dialogs::RowDescriptor activeChat() const override;
|
||||
|
@ -121,7 +121,7 @@ public:
|
|||
|
||||
object_ptr<Window::SectionWidget> createWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
Window::Column column,
|
||||
const QRect &geometry) override;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/image/image.h"
|
||||
#include "ui/toast/toast.h"
|
||||
#include "ui/text_options.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "window/window_peer_menu.h"
|
||||
#include "boxes/confirm_box.h"
|
||||
#include "boxes/report_box.h"
|
||||
|
@ -119,7 +119,7 @@ void HistoryInner::BotAbout::clickHandlerPressedChanged(
|
|||
|
||||
HistoryInner::HistoryInner(
|
||||
not_null<HistoryWidget*> historyWidget,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
Ui::ScrollArea *scroll,
|
||||
not_null<History*> history)
|
||||
: RpWidget(nullptr)
|
||||
|
|
|
@ -28,7 +28,7 @@ class EmptyPainter;
|
|||
} // namespace HistoryView
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace Ui {
|
||||
|
@ -48,7 +48,7 @@ public:
|
|||
|
||||
HistoryInner(
|
||||
not_null<HistoryWidget*> historyWidget,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
Ui::ScrollArea *scroll,
|
||||
not_null<History*> history);
|
||||
|
||||
|
@ -302,7 +302,7 @@ private:
|
|||
|
||||
static HistoryInner *Instance;
|
||||
|
||||
not_null<Window::Controller*> _controller;
|
||||
not_null<Window::SessionController*> _controller;
|
||||
|
||||
const not_null<PeerData*> _peer;
|
||||
const not_null<History*> _history;
|
||||
|
|
|
@ -29,7 +29,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "media/audio/media_audio.h"
|
||||
#include "core/application.h"
|
||||
#include "mainwindow.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "core/crash_reports.h"
|
||||
#include "data/data_session.h"
|
||||
#include "data/data_messages.h"
|
||||
|
@ -802,7 +802,7 @@ ClickHandlerPtr goToMessageClickHandler(
|
|||
main->pushReplyReturn(returnTo);
|
||||
}
|
||||
}
|
||||
App::wnd()->controller()->showPeerHistory(
|
||||
App::wnd()->sessionController()->showPeerHistory(
|
||||
peer,
|
||||
Window::SectionShow::Way::Forward,
|
||||
msgId);
|
||||
|
|
|
@ -43,7 +43,7 @@ class Media;
|
|||
} // namespace Data
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace HistoryView {
|
||||
|
|
|
@ -25,7 +25,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "core/application.h"
|
||||
#include "layout.h"
|
||||
#include "window/notifications_manager.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "observer_peer.h"
|
||||
#include "storage/storage_shared_media.h"
|
||||
#include "data/data_session.h"
|
||||
|
|
|
@ -24,7 +24,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "data/data_channel.h"
|
||||
#include "data/data_user.h"
|
||||
#include "window/notifications_manager.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "storage/storage_shared_media.h"
|
||||
#include "ui/text_options.h"
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "auth_session.h"
|
||||
#include "window/themes/window_theme.h"
|
||||
#include "window/notifications_manager.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "window/window_slide_animation.h"
|
||||
#include "window/window_peer_menu.h"
|
||||
#include "inline_bots/inline_results_widget.h"
|
||||
|
@ -117,7 +117,7 @@ ApiWrap::RequestMessageDataCallback replyEditMessageDataCallback() {
|
|||
};
|
||||
}
|
||||
|
||||
void ActivateWindow(not_null<Window::Controller*> controller) {
|
||||
void ActivateWindow(not_null<Window::SessionController*> controller) {
|
||||
const auto window = controller->window();
|
||||
window->activateWindow();
|
||||
Core::App().activateWindowDelayed(window);
|
||||
|
@ -147,7 +147,7 @@ bool ShowHistoryEndInsteadOfUnread(
|
|||
|
||||
object_ptr<Ui::FlatButton> SetupDiscussButton(
|
||||
not_null<QWidget*> parent,
|
||||
not_null<Window::Controller*> controller) {
|
||||
not_null<Window::SessionController*> controller) {
|
||||
auto result = object_ptr<Ui::FlatButton>(
|
||||
parent,
|
||||
QString(),
|
||||
|
@ -283,7 +283,7 @@ void ReportSpamPanel::setReported(bool reported, PeerData *onPeer) {
|
|||
|
||||
HistoryWidget::HistoryWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller)
|
||||
not_null<Window::SessionController*> controller)
|
||||
: Window::AbstractSectionWidget(parent, controller)
|
||||
, _updateEditTimeLeftDisplay([=] { updateField(); })
|
||||
, _fieldBarCancel(this, st::historyReplyCancel)
|
||||
|
@ -475,13 +475,13 @@ HistoryWidget::HistoryWidget(
|
|||
|
||||
_topShadow->hide();
|
||||
|
||||
_attachDragDocument->setDroppedCallback([this](const QMimeData *data) {
|
||||
_attachDragDocument->setDroppedCallback([=](const QMimeData *data) {
|
||||
confirmSendingFiles(data, CompressConfirm::No);
|
||||
ActivateWindow(this->controller());
|
||||
ActivateWindow(controller);
|
||||
});
|
||||
_attachDragPhoto->setDroppedCallback([=](const QMimeData *data) {
|
||||
confirmSendingFiles(data, CompressConfirm::Yes);
|
||||
ActivateWindow(this->controller());
|
||||
ActivateWindow(controller);
|
||||
});
|
||||
|
||||
subscribe(Adaptive::Changed(), [=] { update(); });
|
||||
|
@ -548,7 +548,7 @@ HistoryWidget::HistoryWidget(
|
|||
| UpdateFlag::ChannelAmIn
|
||||
| UpdateFlag::ChannelPromotedChanged
|
||||
| UpdateFlag::ChannelLinkedChat;
|
||||
subscribe(Notify::PeerUpdated(), Notify::PeerUpdatedHandler(changes, [this](const Notify::PeerUpdate &update) {
|
||||
subscribe(Notify::PeerUpdated(), Notify::PeerUpdatedHandler(changes, [=](const Notify::PeerUpdate &update) {
|
||||
if (update.peer == _peer) {
|
||||
if (update.flags & UpdateFlag::RightsChanged) {
|
||||
checkPreview();
|
||||
|
@ -568,7 +568,7 @@ HistoryWidget::HistoryWidget(
|
|||
if (update.flags & UpdateFlag::UnavailableReasonChanged) {
|
||||
const auto unavailable = _peer->unavailableReason();
|
||||
if (!unavailable.isEmpty()) {
|
||||
this->controller()->showBackFromStack();
|
||||
controller->showBackFromStack();
|
||||
Ui::show(Box<InformBox>(unavailable));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ class RoundButton;
|
|||
} // namespace Ui
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace ChatHelpers {
|
||||
|
@ -117,7 +117,7 @@ class HistoryWidget final : public Window::AbstractSectionWidget, public RPCSend
|
|||
public:
|
||||
using FieldHistoryAction = Ui::InputField::HistoryAction;
|
||||
|
||||
HistoryWidget(QWidget *parent, not_null<Window::Controller*> controller);
|
||||
HistoryWidget(QWidget *parent, not_null<Window::SessionController*> controller);
|
||||
|
||||
void start();
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "history/history.h"
|
||||
#include "history/view/history_view_element.h"
|
||||
#include "history/view/history_view_cursor_state.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "ui/empty_userpic.h"
|
||||
#include "ui/text_options.h"
|
||||
#include "data/data_session.h"
|
||||
|
@ -35,7 +35,7 @@ namespace {
|
|||
|
||||
ClickHandlerPtr sendMessageClickHandler(PeerData *peer) {
|
||||
return std::make_shared<LambdaClickHandler>([peer] {
|
||||
App::wnd()->controller()->showPeerHistory(
|
||||
App::wnd()->sessionController()->showPeerHistory(
|
||||
peer->id,
|
||||
Window::SectionShow::Way::Forward);
|
||||
});
|
||||
|
|
|
@ -21,8 +21,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "history/history.h"
|
||||
#include "history/view/history_view_element.h"
|
||||
#include "history/view/history_view_cursor_state.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "core/application.h" // for Application::showDocument.
|
||||
#include "window/window_session_controller.h"
|
||||
#include "core/application.h" // Application::showDocument.
|
||||
#include "ui/image/image.h"
|
||||
#include "data/data_session.h"
|
||||
#include "data/data_document.h"
|
||||
|
@ -297,7 +297,7 @@ void HistoryGif::draw(Painter &p, const QRect &r, TextSelection selection, crl::
|
|||
auto roundCorners = (isRound || inWebPage) ? RectPart::AllCorners : ((isBubbleTop() ? (RectPart::TopLeft | RectPart::TopRight) : RectPart::None)
|
||||
| ((isBubbleBottom() && _caption.isEmpty()) ? (RectPart::BottomLeft | RectPart::BottomRight) : RectPart::None));
|
||||
if (animating) {
|
||||
auto paused = App::wnd()->controller()->isGifPausedAtLeastFor(Window::GifPauseReason::Any);
|
||||
auto paused = App::wnd()->sessionController()->isGifPausedAtLeastFor(Window::GifPauseReason::Any);
|
||||
if (isRound) {
|
||||
if (player) {
|
||||
paused = false;
|
||||
|
|
|
@ -16,8 +16,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "history/view/history_view_cursor_state.h"
|
||||
#include "ui/image/image.h"
|
||||
#include "ui/emoji_config.h"
|
||||
#include "mainwindow.h" // App::wnd()->controller()
|
||||
#include "window/window_controller.h" // isGifPausedAtLeastFor(..)
|
||||
#include "mainwindow.h" // App::wnd()->sessionController.
|
||||
#include "window/window_session_controller.h" // isGifPausedAtLeastFor.
|
||||
#include "data/data_session.h"
|
||||
#include "data/data_document.h"
|
||||
#include "lottie/lottie_animation.h"
|
||||
|
@ -191,7 +191,7 @@ void HistorySticker::draw(Painter &p, const QRect &r, TextSelection selection, c
|
|||
if (selected) {
|
||||
request.colored = st::msgStickerOverlay->c;
|
||||
}
|
||||
const auto paused = App::wnd()->controller()->isGifPausedAtLeastFor(Window::GifPauseReason::Any);
|
||||
const auto paused = App::wnd()->sessionController()->isGifPausedAtLeastFor(Window::GifPauseReason::Any);
|
||||
if (!paused) {
|
||||
_lottie->markFrameShown();
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "core/application.h"
|
||||
#include "apiwrap.h"
|
||||
#include "layout.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "window/window_peer_menu.h"
|
||||
#include "auth_session.h"
|
||||
#include "ui/widgets/popup_menu.h"
|
||||
|
@ -232,7 +232,7 @@ void ListWidget::enumerateDates(Method method) {
|
|||
|
||||
ListWidget::ListWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<ListDelegate*> delegate)
|
||||
: RpWidget(parent)
|
||||
, _delegate(delegate)
|
||||
|
|
|
@ -20,7 +20,7 @@ class PopupMenu;
|
|||
} // namespace Ui
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace Data {
|
||||
|
@ -125,7 +125,7 @@ class ListWidget final
|
|||
public:
|
||||
ListWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<ListDelegate*> delegate);
|
||||
|
||||
not_null<ListDelegate*> delegate() const;
|
||||
|
@ -419,7 +419,7 @@ private:
|
|||
static constexpr auto kMinimalIdsLimit = 24;
|
||||
|
||||
not_null<ListDelegate*> _delegate;
|
||||
not_null<Window::Controller*> _controller;
|
||||
not_null<Window::SessionController*> _controller;
|
||||
Data::MessagePosition _aroundPosition;
|
||||
Data::MessagePosition _shownAtPosition;
|
||||
Context _context;
|
||||
|
|
|
@ -21,7 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "mainwidget.h"
|
||||
#include "mainwindow.h"
|
||||
#include "auth_session.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "layout.h"
|
||||
#include "styles/style_widgets.h"
|
||||
#include "styles/style_history.h"
|
||||
|
@ -1466,7 +1466,7 @@ ClickHandlerPtr Message::rightActionLink() const {
|
|||
_rightActionLink = std::make_shared<LambdaClickHandler>([=] {
|
||||
if (const auto item = Auth().data().message(itemId)) {
|
||||
if (savedFromPeer && savedFromMsgId) {
|
||||
App::wnd()->controller()->showPeerHistory(
|
||||
App::wnd()->sessionController()->showPeerHistory(
|
||||
savedFromPeer,
|
||||
Window::SectionShow::Way::Forward,
|
||||
savedFromMsgId);
|
||||
|
|
|
@ -25,7 +25,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/widgets/buttons.h"
|
||||
#include "ui/widgets/dropdown_menu.h"
|
||||
#include "ui/effects/radial_animation.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "window/window_peer_menu.h"
|
||||
#include "calls/calls_instance.h"
|
||||
#include "data/data_peer_values.h"
|
||||
|
@ -46,7 +46,7 @@ namespace HistoryView {
|
|||
|
||||
TopBarWidget::TopBarWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller)
|
||||
not_null<Window::SessionController*> controller)
|
||||
: RpWidget(parent)
|
||||
, _controller(controller)
|
||||
, _clear(this, langFactory(lng_selected_clear), st::topBarClearButton)
|
||||
|
|
|
@ -22,7 +22,7 @@ class InfiniteRadialAnimation;
|
|||
} // namespace Ui
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace HistoryView {
|
||||
|
@ -31,7 +31,7 @@ class TopBarWidget : public Ui::RpWidget, private base::Subscriber {
|
|||
public:
|
||||
TopBarWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller);
|
||||
not_null<Window::SessionController*> controller);
|
||||
|
||||
struct SelectedState {
|
||||
bool textSelected = false;
|
||||
|
@ -107,7 +107,7 @@ private:
|
|||
void refreshUnreadBadge();
|
||||
void updateUnreadBadge();
|
||||
|
||||
not_null<Window::Controller*> _controller;
|
||||
not_null<Window::SessionController*> _controller;
|
||||
Dialogs::Key _activeChat;
|
||||
|
||||
int _selectedCount = 0;
|
||||
|
|
|
@ -11,7 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "info/info_controller.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "mtproto/sender.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "ui/widgets/scroll_area.h"
|
||||
#include "ui/search_field_controller.h"
|
||||
#include "data/data_user.h"
|
||||
|
|
|
@ -10,7 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include <rpl/never.h>
|
||||
#include <rpl/combine.h>
|
||||
#include <rpl/range.h>
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "ui/widgets/scroll_area.h"
|
||||
#include "ui/widgets/input_fields.h"
|
||||
#include "ui/wrap/padding_wrap.h"
|
||||
|
|
|
@ -20,7 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "data/data_chat.h"
|
||||
#include "data/data_session.h"
|
||||
#include "auth_session.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
|
||||
namespace Info {
|
||||
namespace {
|
||||
|
@ -86,8 +86,9 @@ rpl::producer<QString> AbstractController::mediaSourceQueryValue() const {
|
|||
return rpl::single(QString());
|
||||
}
|
||||
|
||||
AbstractController::AbstractController(not_null<Window::Controller*> parent)
|
||||
: Navigation(&parent->session())
|
||||
AbstractController::AbstractController(
|
||||
not_null<Window::SessionController*> parent)
|
||||
: SessionNavigation(&parent->session())
|
||||
, _parent(parent) {
|
||||
}
|
||||
|
||||
|
@ -118,7 +119,7 @@ void AbstractController::showBackFromStack(
|
|||
|
||||
Controller::Controller(
|
||||
not_null<WrapWidget*> widget,
|
||||
not_null<Window::Controller*> window,
|
||||
not_null<Window::SessionController*> window,
|
||||
not_null<ContentMemento*> memento)
|
||||
: AbstractController(window)
|
||||
, _widget(widget)
|
||||
|
|
|
@ -9,7 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
|
||||
#include <rpl/variable.h>
|
||||
#include "data/data_search_controller.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "settings/settings_common.h"
|
||||
|
||||
namespace Ui {
|
||||
|
@ -97,9 +97,9 @@ private:
|
|||
|
||||
};
|
||||
|
||||
class AbstractController : public Window::Navigation {
|
||||
class AbstractController : public Window::SessionNavigation {
|
||||
public:
|
||||
AbstractController(not_null<Window::Controller*> parent);
|
||||
AbstractController(not_null<Window::SessionController*> parent);
|
||||
|
||||
virtual Key key() const = 0;
|
||||
virtual PeerData *migrated() const = 0;
|
||||
|
@ -127,12 +127,12 @@ public:
|
|||
const Window::SectionShow ¶ms = Window::SectionShow()) override;
|
||||
void showBackFromStack(
|
||||
const Window::SectionShow ¶ms = Window::SectionShow()) override;
|
||||
not_null<Window::Controller*> parentController() override {
|
||||
not_null<Window::SessionController*> parentController() override {
|
||||
return _parent;
|
||||
}
|
||||
|
||||
private:
|
||||
not_null<Window::Controller*> _parent;
|
||||
not_null<Window::SessionController*> _parent;
|
||||
|
||||
};
|
||||
|
||||
|
@ -140,7 +140,7 @@ class Controller : public AbstractController {
|
|||
public:
|
||||
Controller(
|
||||
not_null<WrapWidget*> widget,
|
||||
not_null<Window::Controller*> window,
|
||||
not_null<Window::SessionController*> window,
|
||||
not_null<ContentMemento*> memento);
|
||||
|
||||
Key key() const override {
|
||||
|
|
|
@ -14,7 +14,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/focus_persister.h"
|
||||
#include "ui/widgets/buttons.h"
|
||||
#include "window/section_widget.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "window/main_window.h"
|
||||
#include "auth_session.h"
|
||||
#include "styles/style_info.h"
|
||||
|
@ -24,7 +24,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
namespace Info {
|
||||
|
||||
LayerWidget::LayerWidget(
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<Memento*> memento)
|
||||
: _controller(controller)
|
||||
, _content(this, controller, Wrap::Layer, memento) {
|
||||
|
@ -33,7 +33,7 @@ LayerWidget::LayerWidget(
|
|||
}
|
||||
|
||||
LayerWidget::LayerWidget(
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<MoveMemento*> memento)
|
||||
: _controller(controller)
|
||||
, _content(memento->takeContent(this, Wrap::Layer)) {
|
||||
|
@ -50,7 +50,7 @@ not_null<Ui::RpWidget*> LayerWidget::floatPlayerWidget() {
|
|||
return this;
|
||||
}
|
||||
|
||||
not_null<Window::Controller*> LayerWidget::floatPlayerController() {
|
||||
not_null<Window::SessionController*> LayerWidget::floatPlayerController() {
|
||||
return _controller;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "media/player/media_player_float.h"
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace Info {
|
||||
|
@ -26,10 +26,10 @@ class LayerWidget
|
|||
, private ::Media::Player::FloatDelegate {
|
||||
public:
|
||||
LayerWidget(
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<Memento*> memento);
|
||||
LayerWidget(
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<MoveMemento*> memento);
|
||||
|
||||
void showFinished() override;
|
||||
|
@ -58,7 +58,7 @@ private:
|
|||
void restoreFloatPlayerDelegate();
|
||||
not_null<::Media::Player::FloatDelegate*> floatPlayerDelegate();
|
||||
not_null<Ui::RpWidget*> floatPlayerWidget() override;
|
||||
not_null<Window::Controller*> floatPlayerController() override;
|
||||
not_null<Window::SessionController*> floatPlayerController() override;
|
||||
not_null<Window::AbstractSectionWidget*> floatPlayerGetSection(
|
||||
Window::Column column) override;
|
||||
void floatPlayerEnumerateSections(Fn<void(
|
||||
|
@ -68,7 +68,7 @@ private:
|
|||
|
||||
void setupHeightConsumers();
|
||||
|
||||
not_null<Window::Controller*> _controller;
|
||||
not_null<Window::SessionController*> _controller;
|
||||
object_ptr<WrapWidget> _content;
|
||||
|
||||
int _desiredHeight = 0;
|
||||
|
|
|
@ -147,7 +147,7 @@ std::unique_ptr<ContentMemento> Memento::DefaultContent(
|
|||
|
||||
object_ptr<Window::SectionWidget> Memento::createWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
Window::Column column,
|
||||
const QRect &geometry) {
|
||||
auto wrap = (column == Window::Column::Third)
|
||||
|
@ -163,7 +163,7 @@ object_ptr<Window::SectionWidget> Memento::createWidget(
|
|||
}
|
||||
|
||||
object_ptr<Window::LayerWidget> Memento::createLayer(
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
const QRect &geometry) {
|
||||
if (geometry.width() >= LayerWidget::MinimalSupportedWidth()) {
|
||||
return object_ptr<LayerWidget>(controller, this);
|
||||
|
@ -185,7 +185,7 @@ MoveMemento::MoveMemento(object_ptr<WrapWidget> content)
|
|||
|
||||
object_ptr<Window::SectionWidget> MoveMemento::createWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
Window::Column column,
|
||||
const QRect &geometry) {
|
||||
auto wrap = (column == Window::Column::Third)
|
||||
|
@ -201,7 +201,7 @@ object_ptr<Window::SectionWidget> MoveMemento::createWidget(
|
|||
}
|
||||
|
||||
object_ptr<Window::LayerWidget> MoveMemento::createLayer(
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
const QRect &geometry) {
|
||||
if (geometry.width() < LayerWidget::MinimalSupportedWidth()) {
|
||||
return nullptr;
|
||||
|
|
|
@ -39,12 +39,12 @@ public:
|
|||
|
||||
object_ptr<Window::SectionWidget> createWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
Window::Column column,
|
||||
const QRect &geometry) override;
|
||||
|
||||
object_ptr<Window::LayerWidget> createLayer(
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
const QRect &geometry) override;
|
||||
|
||||
int stackSize() const {
|
||||
|
@ -93,12 +93,12 @@ public:
|
|||
|
||||
object_ptr<Window::SectionWidget> createWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
Window::Column column,
|
||||
const QRect &geometry) override;
|
||||
|
||||
object_ptr<Window::LayerWidget> createLayer(
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
const QRect &geometry) override;
|
||||
|
||||
bool instant() const override {
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace Info {
|
|||
|
||||
SectionWidget::SectionWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> window,
|
||||
not_null<Window::SessionController*> window,
|
||||
Wrap wrap,
|
||||
not_null<Memento*> memento)
|
||||
: Window::SectionWidget(parent, window)
|
||||
|
@ -28,7 +28,7 @@ SectionWidget::SectionWidget(
|
|||
|
||||
SectionWidget::SectionWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> window,
|
||||
not_null<Window::SessionController*> window,
|
||||
Wrap wrap,
|
||||
not_null<MoveMemento*> memento)
|
||||
: Window::SectionWidget(parent, window)
|
||||
|
|
|
@ -30,12 +30,12 @@ class SectionWidget final : public Window::SectionWidget {
|
|||
public:
|
||||
SectionWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> window,
|
||||
not_null<Window::SessionController*> window,
|
||||
Wrap wrap,
|
||||
not_null<Memento*> memento);
|
||||
SectionWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> window,
|
||||
not_null<Window::SessionController*> window,
|
||||
Wrap wrap,
|
||||
not_null<MoveMemento*> memento);
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/search_field_controller.h"
|
||||
#include "calls/calls_instance.h"
|
||||
#include "core/shortcuts.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "window/window_slide_animation.h"
|
||||
#include "window/window_peer_menu.h"
|
||||
#include "boxes/peer_list_box.h"
|
||||
|
@ -53,7 +53,7 @@ struct WrapWidget::StackItem {
|
|||
|
||||
WrapWidget::WrapWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> window,
|
||||
not_null<Window::SessionController*> window,
|
||||
Wrap wrap,
|
||||
not_null<Memento*> memento)
|
||||
: SectionWidget(parent, window)
|
||||
|
@ -198,7 +198,7 @@ void WrapWidget::injectActiveProfileMemento(
|
|||
}
|
||||
|
||||
std::unique_ptr<Controller> WrapWidget::createController(
|
||||
not_null<Window::Controller*> window,
|
||||
not_null<Window::SessionController*> window,
|
||||
not_null<ContentMemento*> memento) {
|
||||
auto result = std::make_unique<Controller>(
|
||||
this,
|
||||
|
|
|
@ -73,7 +73,7 @@ class WrapWidget final : public Window::SectionWidget {
|
|||
public:
|
||||
WrapWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> window,
|
||||
not_null<Window::SessionController*> window,
|
||||
Wrap wrap,
|
||||
not_null<Memento*> memento);
|
||||
|
||||
|
@ -183,7 +183,7 @@ private:
|
|||
not_null<ContentMemento*> memento,
|
||||
not_null<Controller*> controller);
|
||||
std::unique_ptr<Controller> createController(
|
||||
not_null<Window::Controller*> window,
|
||||
not_null<Window::SessionController*> window,
|
||||
not_null<ContentMemento*> memento);
|
||||
//void convertProfileFromStackToTab();
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "info/profile/info_profile_values.h"
|
||||
#include "ui/wrap/slide_wrap.h"
|
||||
#include "ui/wrap/vertical_layout.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "data/data_channel.h"
|
||||
#include "data/data_user.h"
|
||||
#include "styles/style_info.h"
|
||||
|
@ -80,7 +80,7 @@ inline auto AddCountedButton(
|
|||
|
||||
inline auto AddButton(
|
||||
Ui::VerticalLayout *parent,
|
||||
not_null<Window::Navigation*> navigation,
|
||||
not_null<Window::SessionNavigation*> navigation,
|
||||
not_null<PeerData*> peer,
|
||||
PeerData *migrated,
|
||||
Type type,
|
||||
|
@ -99,7 +99,7 @@ inline auto AddButton(
|
|||
|
||||
inline auto AddCommonGroupsButton(
|
||||
Ui::VerticalLayout *parent,
|
||||
not_null<Window::Navigation*> navigation,
|
||||
not_null<Window::SessionNavigation*> navigation,
|
||||
not_null<UserData*> user,
|
||||
Ui::MultiSlideTracker &tracker) {
|
||||
auto result = AddCountedButton(
|
||||
|
|
|
@ -17,7 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "history/history.h"
|
||||
#include "history/view/history_view_cursor_state.h"
|
||||
#include "window/themes/window_theme.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "window/window_peer_menu.h"
|
||||
#include "storage/file_download.h"
|
||||
#include "ui/widgets/popup_menu.h"
|
||||
|
|
|
@ -31,7 +31,7 @@ class ItemBase;
|
|||
} // namespace Overview
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace Info {
|
||||
|
|
|
@ -32,7 +32,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "info/profile/info_profile_button.h"
|
||||
#include "info/profile/info_profile_text.h"
|
||||
#include "support/support_helper.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "window/window_peer_menu.h"
|
||||
#include "mainwidget.h"
|
||||
#include "auth_session.h"
|
||||
|
|
|
@ -21,7 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/widgets/labels.h"
|
||||
#include "ui/effects/ripple_animation.h"
|
||||
#include "ui/special_buttons.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "observer_peer.h"
|
||||
#include "core/application.h"
|
||||
#include "auth_session.h"
|
||||
|
@ -211,7 +211,7 @@ int SectionWithToggle::toggleSkip() const {
|
|||
Cover::Cover(
|
||||
QWidget *parent,
|
||||
not_null<PeerData*> peer,
|
||||
not_null<Window::Controller*> controller)
|
||||
not_null<Window::SessionController*> controller)
|
||||
: SectionWithToggle(
|
||||
parent,
|
||||
st::infoProfilePhotoTop
|
||||
|
|
|
@ -12,7 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "base/timer.h"
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace style {
|
||||
|
@ -58,7 +58,7 @@ public:
|
|||
Cover(
|
||||
QWidget *parent,
|
||||
not_null<PeerData*> peer,
|
||||
not_null<Window::Controller*> controller);
|
||||
not_null<Window::SessionController*> controller);
|
||||
|
||||
Cover *setOnlineCount(rpl::producer<int> &&count);
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "auth_session.h"
|
||||
#include "apiwrap.h"
|
||||
#include "window/main_window.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "storage/storage_shared_media.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "styles/style_info.h"
|
||||
|
|
|
@ -11,7 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/rp_widget.h"
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace Ui {
|
||||
|
|
|
@ -27,7 +27,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "lang/lang_keys.h"
|
||||
#include "boxes/confirm_box.h"
|
||||
#include "boxes/peers/add_participants_box.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "data/data_channel.h"
|
||||
#include "data/data_chat.h"
|
||||
#include "data/data_user.h"
|
||||
|
|
|
@ -20,7 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "data/data_chat.h"
|
||||
#include "data/data_user.h"
|
||||
#include "boxes/confirm_box.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "styles/style_info.h"
|
||||
#include "data/data_peer_values.h"
|
||||
|
||||
|
@ -94,7 +94,7 @@ void MemberListRow::paintNameIcon(
|
|||
}
|
||||
|
||||
std::unique_ptr<PeerListController> CreateMembersController(
|
||||
not_null<Window::Navigation*> navigation,
|
||||
not_null<Window::SessionNavigation*> navigation,
|
||||
not_null<PeerData*> peer) {
|
||||
return std::make_unique<ParticipantsBoxController>(
|
||||
navigation,
|
||||
|
|
|
@ -10,7 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "boxes/peer_list_box.h"
|
||||
|
||||
namespace Window {
|
||||
class Navigation;
|
||||
class SessionNavigation;
|
||||
} // namespace Window
|
||||
|
||||
namespace Info {
|
||||
|
@ -58,7 +58,7 @@ private:
|
|||
};
|
||||
|
||||
std::unique_ptr<PeerListController> CreateMembersController(
|
||||
not_null<Window::Navigation*> navigation,
|
||||
not_null<Window::SessionNavigation*> navigation,
|
||||
not_null<PeerData*> peer);
|
||||
|
||||
} // namespace Profile
|
||||
|
|
|
@ -49,7 +49,7 @@ Widget::Widget(
|
|||
_self))) {
|
||||
_inner->sectionShowOther(
|
||||
) | rpl::start_with_next([=](Type type) {
|
||||
this->controller()->showSettings(type);
|
||||
controller->showSettings(type);
|
||||
}, _inner->lifetime());
|
||||
|
||||
controller->setCanSaveChanges(_inner->sectionCanSaveChanges());
|
||||
|
|
|
@ -27,7 +27,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "apiwrap.h"
|
||||
#include "mainwidget.h"
|
||||
#include "auth_session.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "ui/widgets/scroll_area.h"
|
||||
#include "ui/widgets/labels.h"
|
||||
#include "observer_peer.h"
|
||||
|
@ -42,7 +42,10 @@ constexpr auto kInlineBotRequestDelay = 400;
|
|||
|
||||
} // namespace
|
||||
|
||||
Inner::Inner(QWidget *parent, not_null<Window::Controller*> controller) : TWidget(parent)
|
||||
Inner::Inner(
|
||||
QWidget *parent,
|
||||
not_null<Window::SessionController*> controller)
|
||||
: TWidget(parent)
|
||||
, _controller(controller)
|
||||
, _updateInlineItems([=] { updateInlineItems(); })
|
||||
, _previewTimer([=] { showPreview(); }) {
|
||||
|
@ -720,7 +723,7 @@ void Inner::onSwitchPm() {
|
|||
|
||||
Widget::Widget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller)
|
||||
not_null<Window::SessionController*> controller)
|
||||
: RpWidget(parent)
|
||||
, _controller(controller)
|
||||
, _contentMaxHeight(st::emojiPanMaxHeight)
|
||||
|
|
|
@ -25,7 +25,7 @@ class RippleAnimation;
|
|||
} // namesapce Ui
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace InlineBots {
|
||||
|
@ -52,7 +52,7 @@ class Inner : public TWidget, public Context, private base::Subscriber {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Inner(QWidget *parent, not_null<Window::Controller*> controller);
|
||||
Inner(QWidget *parent, not_null<Window::SessionController*> controller);
|
||||
|
||||
void hideFinish(bool completely);
|
||||
|
||||
|
@ -128,7 +128,7 @@ private:
|
|||
int validateExistingInlineRows(const Results &results);
|
||||
void selectInlineResult(int row, int column);
|
||||
|
||||
not_null<Window::Controller*> _controller;
|
||||
not_null<Window::SessionController*> _controller;
|
||||
|
||||
int _visibleTop = 0;
|
||||
int _visibleBottom = 0;
|
||||
|
@ -165,7 +165,7 @@ class Widget : public Ui::RpWidget, private MTP::Sender {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Widget(QWidget *parent, not_null<Window::Controller*> controller);
|
||||
Widget(QWidget *parent, not_null<Window::SessionController*> controller);
|
||||
|
||||
void moveBottom(int bottom);
|
||||
|
||||
|
@ -233,7 +233,7 @@ private:
|
|||
bool refreshInlineRows(int *added = nullptr);
|
||||
void inlineResultsDone(const MTPmessages_BotResults &result);
|
||||
|
||||
not_null<Window::Controller*> _controller;
|
||||
not_null<Window::SessionController*> _controller;
|
||||
|
||||
int _contentMaxHeight = 0;
|
||||
int _contentHeight = 0;
|
||||
|
|
|
@ -75,7 +75,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "window/window_top_bar_wrap.h"
|
||||
#include "window/notifications_manager.h"
|
||||
#include "window/window_slide_animation.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "window/themes/window_theme.h"
|
||||
#include "window/window_history_hider.h"
|
||||
#include "mtproto/dc_options.h"
|
||||
|
@ -355,7 +355,7 @@ MainWidget::SettingBackground::SettingBackground(
|
|||
|
||||
MainWidget::MainWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller)
|
||||
not_null<Window::SessionController*> controller)
|
||||
: RpWidget(parent)
|
||||
, _controller(controller)
|
||||
, _dialogsWidth(st::columnMinimalWidthLeft)
|
||||
|
@ -499,7 +499,7 @@ not_null<Ui::RpWidget*> MainWidget::floatPlayerWidget() {
|
|||
return this;
|
||||
}
|
||||
|
||||
not_null<Window::Controller*> MainWidget::floatPlayerController() {
|
||||
not_null<Window::SessionController*> MainWidget::floatPlayerController() {
|
||||
return _controller;
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ class SlideWrap;
|
|||
} // namespace Ui
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
template <typename Inner>
|
||||
class TopBarWrapWidget;
|
||||
class SectionMemento;
|
||||
|
@ -97,7 +97,7 @@ class MainWidget
|
|||
public:
|
||||
using SectionShow = Window::SectionShow;
|
||||
|
||||
MainWidget(QWidget *parent, not_null<Window::Controller*> controller);
|
||||
MainWidget(QWidget *parent, not_null<Window::SessionController*> controller);
|
||||
|
||||
AuthSession &session() const;
|
||||
|
||||
|
@ -410,7 +410,7 @@ private:
|
|||
|
||||
not_null<Media::Player::FloatDelegate*> floatPlayerDelegate();
|
||||
not_null<Ui::RpWidget*> floatPlayerWidget() override;
|
||||
not_null<Window::Controller*> floatPlayerController() override;
|
||||
not_null<Window::SessionController*> floatPlayerController() override;
|
||||
not_null<Window::AbstractSectionWidget*> floatPlayerGetSection(
|
||||
Window::Column column) override;
|
||||
void floatPlayerEnumerateSections(Fn<void(
|
||||
|
@ -445,7 +445,7 @@ private:
|
|||
|
||||
void handleHistoryBack();
|
||||
|
||||
not_null<Window::Controller*> _controller;
|
||||
not_null<Window::SessionController*> _controller;
|
||||
bool _started = false;
|
||||
|
||||
Ui::Animations::Simple _a_show;
|
||||
|
|
|
@ -43,7 +43,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "window/themes/window_theme_warning.h"
|
||||
#include "window/window_lock_widgets.h"
|
||||
#include "window/window_main_menu.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -235,7 +235,7 @@ void MainWindow::setupMain() {
|
|||
|
||||
clearWidgets();
|
||||
|
||||
_main.create(bodyWidget(), controller());
|
||||
_main.create(bodyWidget(), sessionController());
|
||||
_main->show();
|
||||
updateControlsGeometry();
|
||||
|
||||
|
@ -257,7 +257,7 @@ void MainWindow::showSettings() {
|
|||
return;
|
||||
}
|
||||
|
||||
if (const auto controller = this->controller()) {
|
||||
if (const auto controller = sessionController()) {
|
||||
controller->showSettings();
|
||||
} else {
|
||||
showSpecialLayer(Box<Settings::LayerWidget>(), anim::type::normal);
|
||||
|
@ -294,7 +294,7 @@ void MainWindow::showMainMenu() {
|
|||
if (isHidden()) showFromTray();
|
||||
|
||||
ensureLayerCreated();
|
||||
_layer->showMainMenu(controller(), anim::type::normal);
|
||||
_layer->showMainMenu(sessionController(), anim::type::normal);
|
||||
}
|
||||
|
||||
void MainWindow::ensureLayerCreated() {
|
||||
|
@ -309,8 +309,8 @@ void MainWindow::ensureLayerCreated() {
|
|||
destroyLayer();
|
||||
}, _layer->lifetime());
|
||||
|
||||
if (controller()) {
|
||||
controller()->enableGifPauseReason(Window::GifPauseReason::Layer);
|
||||
if (const auto controller = sessionController()) {
|
||||
controller->enableGifPauseReason(Window::GifPauseReason::Layer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -324,8 +324,8 @@ void MainWindow::destroyLayer() {
|
|||
setFocus();
|
||||
}
|
||||
layer = nullptr;
|
||||
if (controller()) {
|
||||
controller()->disableGifPauseReason(Window::GifPauseReason::Layer);
|
||||
if (const auto controller = sessionController()) {
|
||||
controller->disableGifPauseReason(Window::GifPauseReason::Layer);
|
||||
}
|
||||
if (resetFocus) {
|
||||
setInnerFocus();
|
||||
|
@ -385,7 +385,7 @@ void MainWindow::ui_showMediaPreview(
|
|||
return;
|
||||
}
|
||||
if (!_mediaPreview) {
|
||||
_mediaPreview.create(bodyWidget(), controller());
|
||||
_mediaPreview.create(bodyWidget(), sessionController());
|
||||
updateControlsGeometry();
|
||||
}
|
||||
if (_mediaPreview->isHidden()) {
|
||||
|
@ -401,7 +401,7 @@ void MainWindow::ui_showMediaPreview(
|
|||
return;
|
||||
}
|
||||
if (!_mediaPreview) {
|
||||
_mediaPreview.create(bodyWidget(), controller());
|
||||
_mediaPreview.create(bodyWidget(), sessionController());
|
||||
updateControlsGeometry();
|
||||
}
|
||||
if (_mediaPreview->isHidden()) {
|
||||
|
|
|
@ -18,7 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "media/streaming/media_streaming_player.h"
|
||||
#include "media/view/media_view_playback_progress.h"
|
||||
#include "media/player/media_player_instance.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "window/section_widget.h"
|
||||
#include "auth_session.h"
|
||||
#include "styles/style_media_player.h"
|
||||
|
@ -29,7 +29,7 @@ namespace Player {
|
|||
|
||||
Float::Float(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<HistoryItem*> item,
|
||||
Fn<void(bool visible)> toggleCallback,
|
||||
Fn<void(bool closed)> draggedCallback)
|
||||
|
@ -261,7 +261,7 @@ void Float::repaintItem() {
|
|||
template <typename ToggleCallback, typename DraggedCallback>
|
||||
FloatController::Item::Item(
|
||||
not_null<QWidget*> parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<HistoryItem*> item,
|
||||
ToggleCallback toggle,
|
||||
DraggedCallback dragged)
|
||||
|
|
|
@ -11,7 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/effects/animations.h"
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
class AbstractSectionWidget;
|
||||
enum class Column;
|
||||
} // namespace Window
|
||||
|
@ -35,7 +35,7 @@ class Float : public Ui::RpWidget, private base::Subscriber {
|
|||
public:
|
||||
Float(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<HistoryItem*> item,
|
||||
Fn<void(bool visible)> toggleCallback,
|
||||
Fn<void(bool closed)> draggedCallback);
|
||||
|
@ -88,7 +88,7 @@ private:
|
|||
void finishDrag(bool closed);
|
||||
void pauseResume();
|
||||
|
||||
not_null<Window::Controller*> _controller;
|
||||
not_null<Window::SessionController*> _controller;
|
||||
HistoryItem *_item = nullptr;
|
||||
Fn<void(bool visible)> _toggleCallback;
|
||||
|
||||
|
@ -108,7 +108,7 @@ private:
|
|||
class FloatDelegate {
|
||||
public:
|
||||
virtual not_null<Ui::RpWidget*> floatPlayerWidget() = 0;
|
||||
virtual not_null<Window::Controller*> floatPlayerController() = 0;
|
||||
virtual not_null<Window::SessionController*> floatPlayerController() = 0;
|
||||
virtual not_null<Window::AbstractSectionWidget*> floatPlayerGetSection(
|
||||
Window::Column column) = 0;
|
||||
virtual void floatPlayerEnumerateSections(Fn<void(
|
||||
|
@ -192,7 +192,7 @@ private:
|
|||
template <typename ToggleCallback, typename DraggedCallback>
|
||||
Item(
|
||||
not_null<QWidget*> parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<HistoryItem*> item,
|
||||
ToggleCallback toggle,
|
||||
DraggedCallback dragged);
|
||||
|
@ -241,7 +241,7 @@ private:
|
|||
|
||||
not_null<FloatDelegate*> _delegate;
|
||||
not_null<Ui::RpWidget*> _parent;
|
||||
not_null<Window::Controller*> _controller;
|
||||
not_null<Window::SessionController*> _controller;
|
||||
std::vector<std::unique_ptr<Item>> _items;
|
||||
|
||||
rpl::event_stream<FullMsgId> _closeEvents;
|
||||
|
|
|
@ -19,7 +19,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "history/history_item.h"
|
||||
#include "data/data_media_types.h"
|
||||
#include "data/data_file_origin.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "core/shortcuts.h"
|
||||
#include "core/application.h"
|
||||
#include "main/main_account.h" // Account::sessionValue.
|
||||
|
@ -179,7 +179,7 @@ void Instance::clearStreamed(not_null<Data*> data) {
|
|||
requestRoundVideoResize();
|
||||
emitUpdate(data->type);
|
||||
data->streamed = nullptr;
|
||||
App::wnd()->controller()->disableGifPauseReason(
|
||||
App::wnd()->sessionController()->disableGifPauseReason(
|
||||
Window::GifPauseReason::RoundPlaying);
|
||||
}
|
||||
|
||||
|
@ -685,7 +685,7 @@ void Instance::handleStreamingUpdate(
|
|||
float64) {
|
||||
requestRoundVideoRepaint();
|
||||
});
|
||||
App::wnd()->controller()->enableGifPauseReason(
|
||||
App::wnd()->sessionController()->enableGifPauseReason(
|
||||
Window::GifPauseReason::RoundPlaying);
|
||||
requestRoundVideoResize();
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ constexpr auto kDelayedHideTimeout = crl::time(3000);
|
|||
|
||||
Panel::Panel(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> window)
|
||||
not_null<Window::SessionController*> window)
|
||||
: RpWidget(parent)
|
||||
, AbstractController(window)
|
||||
, _showTimer([this] { startShow(); })
|
||||
|
|
|
@ -13,7 +13,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "info/info_controller.h"
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace Ui {
|
||||
|
@ -30,7 +30,7 @@ class Panel : public Ui::RpWidget, private Info::AbstractController {
|
|||
public:
|
||||
Panel(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller);
|
||||
not_null<Window::SessionController*> controller);
|
||||
|
||||
bool overlaps(const QRect &globalRect);
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "data/data_session.h"
|
||||
#include "data/data_user.h"
|
||||
#include "mainwindow.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "core/click_handler_types.h"
|
||||
#include "ui/toast/toast.h"
|
||||
#include "auth_session.h"
|
||||
|
@ -610,7 +610,7 @@ std::vector<EditFile> Value::takeAllFilesInEdit() {
|
|||
}
|
||||
|
||||
FormController::FormController(
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
const FormRequest &request)
|
||||
: _controller(controller)
|
||||
, _request(PreprocessRequest(request))
|
||||
|
|
|
@ -21,7 +21,7 @@ struct UploadSecureProgress;
|
|||
} // namespace Storage
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace Passport {
|
||||
|
@ -322,7 +322,7 @@ struct FileKey {
|
|||
class FormController : private MTP::Sender, public base::has_weak_ptr {
|
||||
public:
|
||||
FormController(
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
const FormRequest &request);
|
||||
|
||||
void show();
|
||||
|
@ -508,7 +508,7 @@ private:
|
|||
void cancelAbort();
|
||||
void shortPollEmailConfirmation();
|
||||
|
||||
not_null<Window::Controller*> _controller;
|
||||
not_null<Window::SessionController*> _controller;
|
||||
FormRequest _request;
|
||||
UserData *_bot = nullptr;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "observer_peer.h"
|
||||
#include "styles/style_media_player.h"
|
||||
#include "window/themes/window_theme.h"
|
||||
#include "window/window_controller.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "ui/empty_userpic.h"
|
||||
#include "styles/style_dialogs.h"
|
||||
|
||||
|
@ -241,7 +241,7 @@ void PaintUnreadBadge(Painter &p, PeerData *peer) {
|
|||
return;
|
||||
}
|
||||
if (const auto folder = Auth().data().folderLoaded(Data::Folder::kId)) {
|
||||
App::wnd()->controller()->openFolder(folder);
|
||||
App::wnd()->sessionController()->openFolder(folder);
|
||||
}
|
||||
};
|
||||
Core::Sandbox::Instance().customEnterFromEventLoop([=] {
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace Settings {
|
|||
object_ptr<Section> CreateSection(
|
||||
Type type,
|
||||
not_null<QWidget*> parent,
|
||||
Window::Controller *controller,
|
||||
Window::SessionController *controller,
|
||||
UserData *self) {
|
||||
switch (type) {
|
||||
case Type::Main:
|
||||
|
|
|
@ -16,7 +16,7 @@ class VerticalLayout;
|
|||
} // namespace Ui
|
||||
|
||||
namespace Window {
|
||||
class Controller;
|
||||
class SessionController;
|
||||
} // namespace Window
|
||||
|
||||
namespace Info {
|
||||
|
@ -62,7 +62,7 @@ public:
|
|||
object_ptr<Section> CreateSection(
|
||||
Type type,
|
||||
not_null<QWidget*> parent,
|
||||
Window::Controller *controller = nullptr,
|
||||
Window::SessionController *controller = nullptr,
|
||||
UserData *self = nullptr);
|
||||
|
||||
void AddSkip(not_null<Ui::VerticalLayout*> container);
|
||||
|
|
|
@ -38,7 +38,7 @@ constexpr auto kSaveBioTimeout = 1000;
|
|||
|
||||
void SetupPhoto(
|
||||
not_null<Ui::VerticalLayout*> container,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<UserData*> self) {
|
||||
const auto wrap = container->add(object_ptr<BoxContentDivider>(
|
||||
container,
|
||||
|
@ -409,7 +409,7 @@ BioManager SetupBio(
|
|||
|
||||
Information::Information(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<UserData*> self)
|
||||
: Section(parent)
|
||||
, _self(self) {
|
||||
|
@ -424,7 +424,7 @@ Information::Information(
|
|||
// _save(std::move(done));
|
||||
//}
|
||||
|
||||
void Information::setupContent(not_null<Window::Controller*> controller) {
|
||||
void Information::setupContent(not_null<Window::SessionController*> controller) {
|
||||
const auto content = Ui::CreateChild<Ui::VerticalLayout>(this);
|
||||
|
||||
SetupPhoto(content, controller, _self);
|
||||
|
|
|
@ -15,11 +15,11 @@ class Information : public Section {
|
|||
public:
|
||||
Information(
|
||||
QWidget *parent,
|
||||
not_null<Window::Controller*> controller,
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<UserData*> self);
|
||||
|
||||
private:
|
||||
void setupContent(not_null<Window::Controller*> controller);
|
||||
void setupContent(not_null<Window::SessionController*> controller);
|
||||
|
||||
not_null<UserData*> _self;
|
||||
//rpl::variable<bool> _canSaveChanges;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue