Rename AuthSession to Main::Session.

This commit is contained in:
John Preston 2019-07-24 13:45:24 +02:00
parent 06982fdf04
commit ff44094ded
201 changed files with 543 additions and 477 deletions

View File

@ -17,7 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "history/history.h"
#include "history/history_message.h" // NewMessageFlags.
#include "ui/text/text_entity.h" // TextWithEntities.
#include "auth_session.h"
#include "main/main_session.h"
#include "mainwidget.h"
#include "apiwrap.h"

View File

@ -35,7 +35,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "history/history_item_components.h"
//#include "history/feed/history_feed_section.h" // #feed
#include "storage/localstorage.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "boxes/confirm_box.h"
#include "boxes/stickers_box.h"
#include "boxes/sticker_set_box.h"
@ -226,7 +226,7 @@ bool ApiWrap::BlockedUsersSlice::operator!=(const BlockedUsersSlice &other) cons
return !(*this == other);
}
ApiWrap::ApiWrap(not_null<AuthSession*> session)
ApiWrap::ApiWrap(not_null<Main::Session*> session)
: _session(session)
, _messageDataResolveDelayed([=] { resolveMessageDatas(); })
, _webPagesTimer([=] { resolveWebPages(); })
@ -249,7 +249,7 @@ ApiWrap::ApiWrap(not_null<AuthSession*> session)
});
}
AuthSession &ApiWrap::session() const {
Main::Session &ApiWrap::session() const {
return *_session;
}

View File

@ -16,13 +16,16 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_messages.h"
class TaskQueue;
class AuthSession;
struct MessageGroupId;
struct SendingAlbum;
enum class SendMediaType;
struct FileLoadTo;
class mtpFileLoader;
namespace Main {
class Session;
} // namespace Main
namespace Data {
struct UpdatedFileReferences;
class WallPaper;
@ -132,9 +135,9 @@ public:
bool operator!=(const BlockedUsersSlice &other) const;
};
explicit ApiWrap(not_null<AuthSession*> session);
explicit ApiWrap(not_null<Main::Session*> session);
AuthSession &session() const;
Main::Session &session() const;
void applyUpdates(
const MTPUpdates &updates,
@ -710,7 +713,7 @@ private:
void sendDialogRequests();
not_null<AuthSession*> _session;
not_null<Main::Session*> _session;
base::flat_map<QString, int> _modifyRequests;

View File

@ -40,7 +40,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "apiwrap.h"
#include "numbers.h"
#include "observer_peer.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "styles/style_overview.h"
#include "styles/style_mediaview.h"
#include "styles/style_chat_helpers.h"
@ -314,7 +314,7 @@ namespace App {
void quit() {
if (quitting()) {
return;
} else if (AuthSession::Exists()
} else if (Main::Session::Exists()
&& Auth().data().exportInProgress()) {
Auth().data().stopExportWithConfirmation([] { App::quit(); });
return;

View File

@ -37,7 +37,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "mainwindow.h"
#include "apiwrap.h"
#include "observer_peer.h"
#include "auth_session.h"
#include "main/main_session.h"
namespace {
@ -156,7 +156,7 @@ class RevokePublicLinkBox::Inner : public TWidget, private MTP::Sender {
public:
Inner(
QWidget *parent,
not_null<AuthSession*> session,
not_null<Main::Session*> session,
Fn<void()> revokeCallback);
protected:
@ -176,7 +176,7 @@ private:
void paintChat(Painter &p, const ChatRow &row, bool selected) const;
void updateSelected();
const not_null<AuthSession*> _session;
const not_null<Main::Session*> _session;
PeerData *_selected = nullptr;
PeerData *_pressed = nullptr;
@ -195,13 +195,13 @@ private:
AddContactBox::AddContactBox(
QWidget*,
not_null<AuthSession*> session)
not_null<Main::Session*> session)
: AddContactBox(nullptr, session, QString(), QString(), QString()) {
}
AddContactBox::AddContactBox(
QWidget*,
not_null<AuthSession*> session,
not_null<Main::Session*> session,
QString fname,
QString lname,
QString phone)
@ -389,7 +389,7 @@ void AddContactBox::updateButtons() {
GroupInfoBox::GroupInfoBox(
QWidget*,
not_null<AuthSession*> session,
not_null<Main::Session*> session,
Type type,
const QString &title,
Fn<void(not_null<ChannelData*>)> channelDone)
@ -1251,7 +1251,7 @@ bool EditNameBox::saveSelfFail(const RPCError &error) {
RevokePublicLinkBox::Inner::Inner(
QWidget *parent,
not_null<AuthSession*> session,
not_null<Main::Session*> session,
Fn<void()> revokeCallback)
: TWidget(parent)
, _session(session)
@ -1295,7 +1295,7 @@ RevokePublicLinkBox::Inner::Inner(
RevokePublicLinkBox::RevokePublicLinkBox(
QWidget*,
not_null<AuthSession*> session,
not_null<Main::Session*> session,
Fn<void()> revokeCallback)
: _session(session)
, _aboutRevoke(

View File

@ -13,11 +13,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
class ConfirmBox;
class PeerListBox;
class AuthSession;
constexpr auto kMaxBioLength = 70;
style::InputField CreateBioFieldStyle();
namespace Main {
class Session;
} // namespace Main
namespace Ui {
class FlatLabel;
@ -33,11 +32,16 @@ class LinkButton;
class UserpicButton;
} // namespace Ui
constexpr auto kMaxBioLength = 70;
enum class PeerFloodType {
Send,
InviteGroup,
InviteChannel,
};
style::InputField CreateBioFieldStyle();
QString PeerFloodErrorText(PeerFloodType type);
void ShowAddParticipantsError(
const QString &error,
@ -46,10 +50,10 @@ void ShowAddParticipantsError(
class AddContactBox : public BoxContent {
public:
AddContactBox(QWidget*, not_null<AuthSession*> session);
AddContactBox(QWidget*, not_null<Main::Session*> session);
AddContactBox(
QWidget*,
not_null<AuthSession*> session,
not_null<Main::Session*> session,
QString fname,
QString lname,
QString phone);
@ -69,7 +73,7 @@ private:
void updateButtons();
void importDone(const MTPcontacts_ImportedContacts &result);
const not_null<AuthSession*> _session;
const not_null<Main::Session*> _session;
object_ptr<Ui::InputField> _first;
object_ptr<Ui::InputField> _last;
@ -94,7 +98,7 @@ public:
};
GroupInfoBox(
QWidget*,
not_null<AuthSession*> session,
not_null<Main::Session*> session,
Type type,
const QString &title = QString(),
Fn<void(not_null<ChannelData*>)> channelDone = nullptr);
@ -114,7 +118,7 @@ private:
void descriptionResized();
void updateMaxHeight();
const not_null<AuthSession*> _session;
const not_null<Main::Session*> _session;
Type _type = Type::Group;
QString _initialTitle;
@ -227,7 +231,7 @@ class RevokePublicLinkBox : public BoxContent, public RPCSender {
public:
RevokePublicLinkBox(
QWidget*,
not_null<AuthSession*> session,
not_null<Main::Session*> session,
Fn<void()> revokeCallback);
protected:
@ -236,7 +240,7 @@ protected:
void resizeEvent(QResizeEvent *e) override;
private:
const not_null<AuthSession*> _session;
const not_null<Main::Session*> _session;
object_ptr<Ui::FlatLabel> _aboutRevoke;

View File

@ -8,7 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "boxes/auto_download_box.h"
#include "lang/lang_keys.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "data/data_session.h"
#include "info/profile/info_profile_button.h"
#include "ui/widgets/continuous_sliders.h"

View File

@ -10,7 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "lang/lang_keys.h"
#include "ui/effects/round_checkbox.h"
#include "ui/image/image.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
#include "mtproto/sender.h"
#include "data/data_session.h"

View File

@ -16,7 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "history/history.h"
#include "history/history_message.h"
#include "history/view/history_view_message.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
#include "data/data_session.h"
#include "data/data_user.h"

View File

@ -15,7 +15,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/text/text_utilities.h"
#include "boxes/confirm_phone_box.h"
#include "boxes/confirm_box.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "data/data_session.h"
#include "styles/style_boxes.h"

View File

@ -31,7 +31,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_chat.h"
#include "data/data_user.h"
#include "base/unixtime.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "observer_peer.h"
TextParseOptions _confirmBoxTextOptions = {

View File

@ -8,7 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "boxes/edit_caption_box.h"
#include "apiwrap.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "chat_helpers/emoji_suggestions_widget.h"
#include "chat_helpers/message_field.h"
#include "chat_helpers/tabbed_panel.h"

View File

@ -21,7 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/binary_guard.h"
#include "lang/lang_keys.h"
#include "apiwrap.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "data/data_user.h"
#include "data/data_chat.h"
#include "data/data_channel.h"

View File

@ -20,7 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_session.h"
#include "lang/lang_keys.h"
#include "mainwindow.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "layout.h"
#include "styles/style_boxes.h"

View File

@ -8,7 +8,7 @@ Copyright (C) 2017, Nicholas Guriev <guriev-ns@ya.ru>
#include "boxes/mute_settings_box.h"
#include "lang/lang_keys.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "data/data_session.h"
#include "styles/style_boxes.h"
#include "ui/special_buttons.h"

View File

@ -12,7 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "boxes/confirm_box.h"
#include "boxes/confirm_phone_box.h"
#include "mainwindow.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "storage/localstorage.h"
#include "ui/widgets/buttons.h"
#include "ui/widgets/input_fields.h"

View File

@ -11,7 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "styles/style_boxes.h"
#include "styles/style_dialogs.h"
#include "styles/style_widgets.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "mainwidget.h"
#include "ui/widgets/multi_select.h"
#include "ui/widgets/labels.h"

View File

@ -10,7 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "boxes/confirm_box.h"
#include "observer_peer.h"
#include "ui/widgets/checkbox.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "data/data_session.h"
#include "data/data_channel.h"
#include "data/data_chat.h"

View File

@ -18,7 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "history/history.h"
#include "dialogs/dialogs_indexed_list.h"
#include "base/unixtime.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "mainwidget.h"
#include "mainwindow.h"
#include "window/window_session_controller.h"

View File

@ -18,7 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "lang/lang_keys.h"
#include "window/window_controller.h"
#include "ui/toast/toast.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
#include "styles/style_boxes.h"
#include "styles/style_info.h"

View File

@ -18,7 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "boxes/confirm_box.h"
#include "boxes/add_contact_box.h"
#include "apiwrap.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "styles/style_boxes.h"
#include "styles/style_info.h"

View File

@ -35,7 +35,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/core_cloud_password.h"
#include "base/unixtime.h"
#include "apiwrap.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "styles/style_boxes.h"
#include "styles/style_info.h"

View File

@ -12,7 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "boxes/peers/add_participants_box.h"
#include "boxes/confirm_box.h"
#include "boxes/add_contact_box.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
#include "lang/lang_keys.h"
#include "mainwidget.h"

View File

@ -8,7 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "boxes/peers/edit_peer_info_box.h"
#include "apiwrap.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "boxes/add_contact_box.h"
#include "boxes/confirm_box.h"
#include "boxes/peer_list_controllers.h"

View File

@ -8,7 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "boxes/peers/edit_peer_type_box.h"
#include "apiwrap.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "boxes/add_contact_box.h"
#include "boxes/confirm_box.h"
#include "boxes/peer_list_controllers.h"

View File

@ -15,7 +15,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/widgets/buttons.h"
#include "ui/widgets/input_fields.h"
#include "mainwindow.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
namespace {

View File

@ -11,7 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/widgets/checkbox.h"
#include "ui/widgets/labels.h"
#include "apiwrap.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "styles/style_boxes.h"
SelfDestructionBox::SelfDestructionBox(

View File

@ -11,7 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "storage/localstorage.h"
#include "mainwidget.h"
#include "mainwindow.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "data/data_session.h"
#include "base/unixtime.h"
#include "boxes/confirm_box.h"

View File

@ -33,12 +33,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_user.h"
#include "data/data_session.h"
#include "data/data_folder.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "core/application.h"
#include "styles/style_boxes.h"
#include "styles/style_history.h"
class ShareBox::Inner
: public Ui::RpWidget
, public RPCSender
@ -1106,7 +1105,7 @@ void ShareGameScoreByHash(const QString &hash) {
}
auto hashDataInts = reinterpret_cast<int32*>(hashData.data());
if (!AuthSession::Exists() || hashDataInts[0] != Auth().userId()) {
if (!Main::Session::Exists() || hashDataInts[0] != Auth().userId()) {
Ui::show(Box<InformBox>(tr::lng_share_wrong_user(tr::now)));
return;
}

View File

@ -25,7 +25,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "lottie/lottie_animation.h"
#include "window/window_session_controller.h"
#include "base/unixtime.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
#include "mainwidget.h"
#include "mainwindow.h"

View File

@ -31,7 +31,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/widgets/input_fields.h"
#include "ui/image/image.h"
#include "window/window_session_controller.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "styles/style_boxes.h"
#include "styles/style_chat_helpers.h"
@ -611,7 +611,7 @@ void StickersBox::saveChanges() {
if (_someArchivedLoaded) {
Local::writeArchivedStickers();
}
if (AuthSession::Exists()) {
if (Main::Session::Exists()) {
Auth().api().saveStickerSets(_installed.widget()->getOrder(), _installed.widget()->getRemovedSets());
}
}

View File

@ -17,7 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/widgets/checkbox.h"
#include "ui/widgets/labels.h"
#include "lang/lang_keys.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
#include "styles/style_boxes.h"

View File

@ -14,7 +14,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/widgets/input_fields.h"
#include "ui/toast/toast.h"
#include "core/application.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "data/data_session.h"
#include "data/data_user.h"
#include "styles/style_boxes.h"

View File

@ -16,7 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "history/history.h"
#include "history/history_item.h"
#include "mainwidget.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "data/data_session.h"
#include "data/data_media_types.h"

View File

@ -7,7 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "calls/calls_call.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
#include "lang/lang_keys.h"
#include "boxes/confirm_box.h"

View File

@ -9,7 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "mtproto/connection.h"
#include "core/application.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
#include "lang/lang_keys.h"
#include "boxes/confirm_box.h"

View File

@ -24,7 +24,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/application.h"
#include "mainwindow.h"
#include "lang/lang_keys.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
#include "observer_peer.h"
#include "platform/platform_specific.h"

View File

@ -11,7 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "history/history_item_components.h"
#include "data/data_user.h"
#include "data/data_session.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "styles/style_widgets.h"
#include "styles/style_history.h"

View File

@ -14,7 +14,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "platform/platform_info.h"
#include "ui/emoji_config.h"
#include "main/main_account.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
namespace ChatHelpers {
@ -468,7 +468,7 @@ int EmojiKeywords::LangPack::maxQueryLength() const {
EmojiKeywords::EmojiKeywords() {
crl::on_main(&_guard, [=] {
handleAuthSessionChanges();
handleSessionChanges();
});
}
@ -486,9 +486,9 @@ void EmojiKeywords::langPackRefreshed() {
_refreshed.fire({});
}
void EmojiKeywords::handleAuthSessionChanges() {
void EmojiKeywords::handleSessionChanges() {
Core::App().activeAccount().sessionValue(
) | rpl::map([](AuthSession *session) {
) | rpl::map([](Main::Session *session) {
return session ? &session->api() : nullptr;
}) | rpl::start_with_next([=](ApiWrap *api) {
apiChanged(api);
@ -528,7 +528,7 @@ void EmojiKeywords::refresh() {
}
std::vector<QString> EmojiKeywords::languages() {
if (!AuthSession::Exists()) {
if (!Main::Session::Exists()) {
return {};
}
refreshInputLanguages();

View File

@ -52,7 +52,7 @@ private:
ApiWrap *api() override;
void langPackRefreshed() override;
void handleAuthSessionChanges();
void handleSessionChanges();
void apiChanged(ApiWrap *api);
void refreshInputLanguages();
[[nodiscard]] std::vector<QString> languages();

View File

@ -17,7 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "platform/platform_specific.h"
#include "core/application.h"
#include "core/event_filter.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "styles/style_chat_helpers.h"
namespace Ui {

View File

@ -18,7 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "lottie/lottie_single_player.h"
#include "ui/widgets/scroll_area.h"
#include "ui/image/image.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "chat_helpers/stickers.h"
#include "base/unixtime.h"
#include "styles/style_history.h"

View File

@ -20,7 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "window/window_session_controller.h"
#include "lang/lang_keys.h"
#include "mainwindow.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "styles/style_boxes.h"
#include "styles/style_history.h"

View File

@ -15,7 +15,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "apiwrap.h"
#include "storage/localstorage.h"
#include "mainwidget.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "mainwindow.h"
#include "ui/toast/toast.h"
#include "ui/emoji_config.h"
@ -1115,7 +1115,7 @@ auto LottieCachedFromContent(
Method &&method,
Storage::Cache::Key baseKey,
LottieSize sizeTag,
not_null<AuthSession*> session,
not_null<Main::Session*> session,
const QByteArray &content,
QSize box) {
const auto key = Storage::Cache::Key{

View File

@ -11,7 +11,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/image/image_source.h"
class DocumentData;
class AuthSession;
namespace Main {
class Session;
} // namespace Main
namespace Storage {
namespace Cache {

View File

@ -28,7 +28,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "boxes/stickers_box.h"
#include "boxes/confirm_box.h"
#include "window/window_session_controller.h" // GifPauseReason.
#include "auth_session.h"
#include "main/main_session.h"
#include "observer_peer.h"
#include "apiwrap.h"
#include "styles/style_chat_helpers.h"
@ -850,7 +850,7 @@ StickersListWidget::StickersListWidget(
}));
}
AuthSession &StickersListWidget::session() const {
Main::Session &StickersListWidget::session() const {
return controller()->session();
}

View File

@ -12,7 +12,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/variant.h"
#include "base/timer.h"
class AuthSession;
namespace Main {
class Session;
} // namespace Main
namespace Window {
class SessionController;
@ -42,7 +44,7 @@ public:
QWidget *parent,
not_null<Window::SessionController*> controller);
AuthSession &session() const;
Main::Session &session() const;
rpl::producer<not_null<DocumentData*>> chosen() const;
rpl::producer<> scrollUpdated() const;

View File

@ -372,7 +372,7 @@ TabbedSelector::TabbedSelector(
TabbedSelector::~TabbedSelector() = default;
AuthSession &TabbedSelector::session() const {
Main::Session &TabbedSelector::session() const {
return _controller->session();
}

View File

@ -11,7 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/effects/animations.h"
#include "ui/effects/panel_animation.h"
#include "mtproto/sender.h"
#include "auth_session.h"
#include "main/main_session.h"
namespace InlineBots {
class Result;
@ -57,7 +57,7 @@ public:
Mode mode = Mode::Full);
~TabbedSelector();
AuthSession &session() const;
Main::Session &session() const;
rpl::producer<EmojiPtr> emojiChosen() const;
rpl::producer<not_null<DocumentData*>> fileChosen() const;

View File

@ -25,7 +25,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "mainwindow.h"
#include "dialogs/dialogs_entry.h"
#include "history/history.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
#include "calls/calls_instance.h"
#include "lang/lang_file_parser.h"
@ -116,8 +116,8 @@ Application::~Application() {
_window.reset();
_mediaView.reset();
// This can call writeMap() that serializes AuthSession.
// In case it gets called after authSessionDestroy() we get missing data.
// This can call writeMap() that serializes Main::Session.
// In case it gets called after destroySession() we get missing data.
Local::finish();
// Some MTP requests can be cancelled from data clearing.

View File

@ -11,7 +11,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "mtproto/auth_key.h"
#include "base/timer.h"
class AuthSessionSettings;
class MainWindow;
class MainWidget;
class FileUploader;
@ -140,7 +139,7 @@ public:
return *_account;
}
// AuthSession component.
// Main::Session component.
int unreadBadge() const;
bool unreadBadgeMuted() const;

View File

@ -71,7 +71,7 @@ QString FormatVersionPrecise(int version) {
} // namespace
Changelogs::Changelogs(not_null<AuthSession*> session, int oldVersion)
Changelogs::Changelogs(not_null<Main::Session*> session, int oldVersion)
: _session(session)
, _oldVersion(oldVersion) {
_session->data().chatsListChanges(
@ -83,7 +83,7 @@ Changelogs::Changelogs(not_null<AuthSession*> session, int oldVersion)
}
std::unique_ptr<Changelogs> Changelogs::Create(
not_null<AuthSession*> session) {
not_null<Main::Session*> session) {
const auto oldVersion = Local::oldMapVersion();
return (oldVersion > 0 && oldVersion < AppVersion)
? std::make_unique<Changelogs>(session, oldVersion)

View File

@ -9,16 +9,18 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/weak_ptr.h"
class AuthSession;
namespace Main {
class Session;
} // namespace Main
namespace Core {
class Changelogs : public base::has_weak_ptr, private base::Subscriber {
public:
Changelogs(not_null<AuthSession*> session, int oldVersion);
Changelogs(not_null<Main::Session*> session, int oldVersion);
static std::unique_ptr<Changelogs> Create(
not_null<AuthSession*> session);
not_null<Main::Session*> session);
private:
void requestCloudLogs();
@ -27,7 +29,7 @@ private:
void addBetaLogs();
void addBetaLog(int changeVersion, const char *changes);
const not_null<AuthSession*> _session;
const not_null<Main::Session*> _session;
const int _oldVersion = 0;
rpl::lifetime _chatsSubscription;
bool _addedSomeLocal = false;

View File

@ -12,7 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/local_url_handlers.h"
#include "core/file_utilities.h"
#include "mainwidget.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "platform/platform_specific.h"
#include "history/view/history_view_element.h"
#include "history/history_item.h"

View File

@ -148,7 +148,7 @@ QString DefaultDownloadPath() {
return QStandardPaths::writableLocation(
QStandardPaths::DownloadLocation)
+ '/'
+ (AuthSession::Exists() && Auth().supportMode()
+ (Main::Session::Exists() && Auth().supportMode()
? "Tsupport Desktop"
: str_const_toString(AppName))
+ '/';

View File

@ -25,7 +25,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_channel.h"
#include "mainwindow.h"
#include "mainwidget.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
namespace Core {
@ -34,7 +34,7 @@ namespace {
using Match = qthelp::RegularExpressionMatch;
bool JoinGroupByHash(const Match &match, const QVariant &context) {
if (!AuthSession::Exists()) {
if (!Main::Session::Exists()) {
return false;
}
const auto hash = match->captured(1);
@ -62,7 +62,7 @@ bool JoinGroupByHash(const Match &match, const QVariant &context) {
}
bool ShowStickerSet(const Match &match, const QVariant &context) {
if (!AuthSession::Exists()) {
if (!Main::Session::Exists()) {
return false;
}
Core::App().hideMediaView();
@ -79,7 +79,7 @@ bool SetLanguage(const Match &match, const QVariant &context) {
}
bool ShareUrl(const Match &match, const QVariant &context) {
if (!AuthSession::Exists()) {
if (!Main::Session::Exists()) {
return false;
}
auto params = url_parse_params(
@ -94,7 +94,7 @@ bool ShareUrl(const Match &match, const QVariant &context) {
}
bool ConfirmPhone(const Match &match, const QVariant &context) {
if (!AuthSession::Exists()) {
if (!Main::Session::Exists()) {
return false;
}
auto params = url_parse_params(
@ -110,7 +110,7 @@ bool ConfirmPhone(const Match &match, const QVariant &context) {
}
bool ShareGameScore(const Match &match, const QVariant &context) {
if (!AuthSession::Exists()) {
if (!Main::Session::Exists()) {
return false;
}
const auto params = url_parse_params(
@ -167,7 +167,7 @@ bool ShowPassport(const Match &match, const QVariant &context) {
}
bool ShowWallPaper(const Match &match, const QVariant &context) {
if (!AuthSession::Exists()) {
if (!Main::Session::Exists()) {
return false;
}
const auto params = url_parse_params(
@ -179,7 +179,7 @@ bool ShowWallPaper(const Match &match, const QVariant &context) {
}
bool ResolveUsername(const Match &match, const QVariant &context) {
if (!AuthSession::Exists()) {
if (!Main::Session::Exists()) {
return false;
}
const auto params = url_parse_params(
@ -229,7 +229,7 @@ bool ResolveUsername(const Match &match, const QVariant &context) {
}
bool ResolvePrivatePost(const Match &match, const QVariant &context) {
if (!AuthSession::Exists()) {
if (!Main::Session::Exists()) {
return false;
}
const auto params = url_parse_params(
@ -274,7 +274,7 @@ bool ResolvePrivatePost(const Match &match, const QVariant &context) {
}
bool HandleUnknown(const Match &match, const QVariant &context) {
if (!AuthSession::Exists()) {
if (!Main::Session::Exists()) {
return false;
}
const auto request = match->captured(1);

View File

@ -17,7 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/unixtime.h"
#include "history/history.h"
#include "observer_peer.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
namespace {

View File

@ -10,7 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "history/history.h"
#include "data/data_channel.h"
#include "data/data_session.h"
#include "auth_session.h"
#include "main/main_session.h"
namespace Data {

View File

@ -11,7 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_channel.h"
#include "data/data_session.h"
#include "history/history.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
#include "observer_peer.h"

View File

@ -453,7 +453,7 @@ Data::Session &DocumentData::owner() const {
return *_owner;
}
AuthSession &DocumentData::session() const {
Main::Session &DocumentData::session() const {
return _owner->session();
}

View File

@ -11,6 +11,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_types.h"
#include "ui/image/image.h"
class mtpFileLoader;
namespace Images {
class Source;
} // namespace Images
@ -31,8 +33,9 @@ namespace Data {
class Session;
} // namespace Data
class AuthSession;
class mtpFileLoader;
namespace Main {
class Session;
} // namespace Main
inline uint64 mediaMix32To64(int32 a, int32 b) {
return (uint64(*reinterpret_cast<uint32*>(&a)) << 32)
@ -84,7 +87,7 @@ public:
DocumentData(not_null<Data::Session*> owner, DocumentId id);
[[nodiscard]] Data::Session &owner() const;
[[nodiscard]] AuthSession &session() const;
[[nodiscard]] Main::Session &session() const;
void setattributes(
const QVector<MTPDocumentAttribute> &attributes);

View File

@ -12,7 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_file_origin.h"
#include "media/clip/media_clip_reader.h"
#include "lottie/lottie_animation.h"
#include "auth_session.h"
#include "main/main_session.h"
namespace Data {
namespace {

View File

@ -17,7 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/application.h"
#include "main/main_account.h"
//#include "storage/storage_feed_messages.h" // #feed
#include "auth_session.h"
#include "main/main_session.h"
#include "observer_peer.h"
#include "apiwrap.h"
#include "mainwidget.h"
@ -30,7 +30,7 @@ constexpr auto kLoadedChatsMinCount = 20;
constexpr auto kShowChatNamesCount = 8;
rpl::producer<int> PinnedDialogsInFolderMaxValue(
not_null<AuthSession*> session) {
not_null<Main::Session*> session) {
return rpl::single(
rpl::empty_value()
) | rpl::then(

View File

@ -12,7 +12,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_messages.h"
class ChannelData;
class AuthSession;
namespace Main {
class Session;
} // namespace Main
namespace Data {

View File

@ -18,7 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "observer_peer.h"
#include "apiwrap.h"
#include "boxes/confirm_box.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "core/application.h"
#include "mainwindow.h"
#include "window/window_session_controller.h"
@ -108,7 +108,7 @@ Data::Session &PeerData::owner() const {
return *_owner;
}
AuthSession &PeerData::session() const {
Main::Session &PeerData::session() const {
return _owner->session();
}

View File

@ -11,18 +11,18 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_flags.h"
#include "data/data_notify_settings.h"
namespace Ui {
class EmptyUserpic;
} // namespace Ui
class AuthSession;
class PeerData;
class UserData;
class ChatData;
class ChannelData;
namespace Ui {
class EmptyUserpic;
} // namespace Ui
namespace Main {
class Account;
class Session;
} // namespace Main
namespace Data {
@ -125,7 +125,7 @@ public:
static constexpr auto kServiceNotificationsId = peerFromUser(777000);
[[nodiscard]] Data::Session &owner() const;
[[nodiscard]] AuthSession &session() const;
[[nodiscard]] Main::Session &session() const;
[[nodiscard]] Main::Account &account() const;
[[nodiscard]] bool isUser() const {

View File

@ -23,7 +23,7 @@ Data::Session &PhotoData::owner() const {
return *_owner;
}
AuthSession &PhotoData::session() const {
Main::Session &PhotoData::session() const {
return _owner->session();
}

View File

@ -9,7 +9,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_types.h"
class AuthSession;
namespace Main {
class Session;
} // namespace Main
namespace Data {
class Session;
@ -20,7 +22,7 @@ public:
PhotoData(not_null<Data::Session*> owner, PhotoId id);
[[nodiscard]] Data::Session &owner() const;
[[nodiscard]] AuthSession &session() const;
[[nodiscard]] Main::Session &session() const;
void automaticLoad(
Data::FileOrigin origin,

View File

@ -8,7 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_poll.h"
#include "apiwrap.h"
#include "auth_session.h"
#include "main/main_session.h"
namespace {

View File

@ -8,7 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_pts_waiter.h"
#include "mainwidget.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
uint64 PtsWaiter::ptsKey(PtsSkippedQueue queue, int32 pts) {

View File

@ -7,7 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "data/data_search_controller.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "data/data_session.h"
#include "data/data_messages.h"
#include "data/data_channel.h"

View File

@ -8,7 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_session.h"
#include "observer_peer.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
#include "mainwidget.h"
#include "core/application.h"
@ -157,7 +157,7 @@ MTPPhotoSize FindDocumentThumbnail(const MTPDdocument &data) {
}
rpl::producer<int> PinnedDialogsCountMaxValue(
not_null<AuthSession*> session) {
not_null<Main::Session*> session) {
return rpl::single(
rpl::empty_value()
) | rpl::then(
@ -189,7 +189,7 @@ bool PruneDestroyedAndSet(
} // namespace
Session::Session(not_null<AuthSession*> session)
Session::Session(not_null<Main::Session*> session)
: _session(session)
, _cache(Core::App().databases().get(
Local::cachePath(),

View File

@ -33,7 +33,9 @@ class Element;
class ElementDelegate;
} // namespace HistoryView
class AuthSession;
namespace Main {
class Session;
} // namespace Main
namespace Media {
namespace Clip {
@ -70,10 +72,10 @@ public:
QString text;
};
explicit Session(not_null<AuthSession*> session);
explicit Session(not_null<Main::Session*> session);
~Session();
[[nodiscard]] AuthSession &session() const {
[[nodiscard]] Main::Session &session() const {
return *_session;
}
@ -811,7 +813,7 @@ private:
void setWallpapers(const QVector<MTPWallPaper> &data, int32 hash);
not_null<AuthSession*> _session;
not_null<Main::Session*> _session;
Storage::DatabasePointer _cache;
Storage::DatabasePointer _bigFileCache;

View File

@ -8,7 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_shared_media.h"
#include <rpl/combine.h>
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
#include "storage/storage_facade.h"
#include "storage/storage_shared_media.h"

View File

@ -14,7 +14,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/widgets/input_fields.h"
#include "storage/cache/storage_cache_types.h"
#include "base/openssl_help.h"
#include "auth_session.h"
#include "main/main_session.h"
namespace Data {
namespace {

View File

@ -7,7 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "data/data_user_photos.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
#include "data/data_session.h"
#include "storage/storage_facade.h"

View File

@ -12,7 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_session.h"
#include "storage/serialize_common.h"
#include "core/application.h"
#include "auth_session.h"
#include "main/main_session.h"
namespace Data {
namespace {

View File

@ -7,7 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "data/data_web_page.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
#include "mainwidget.h"
#include "data/data_session.h"

View File

@ -12,7 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_session.h"
#include "data/data_folder.h"
#include "mainwidget.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "history/history_item.h"
#include "history/history.h"
#include "styles/style_dialogs.h" // st::dialogsTextWidthMin
@ -49,7 +49,7 @@ Data::Session &Entry::owner() const {
return *_owner;
}
AuthSession &Entry::session() const {
Main::Session &Entry::session() const {
return _owner->session();
}

View File

@ -11,7 +11,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "dialogs/dialogs_key.h"
class AuthSession;
namespace Main {
class Session;
} // namespace Main
namespace Data {
class Session;
@ -93,7 +95,7 @@ public:
virtual ~Entry() = default;
Data::Session &owner() const;
AuthSession &session() const;
Main::Session &session() const;
PositionChange adjustByPosInChatList(Mode list);
bool inChatList(Mode list = Mode::All) const {

View File

@ -7,7 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "dialogs/dialogs_indexed_list.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "data/data_session.h"
#include "history/history.h"

View File

@ -34,7 +34,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "window/themes/window_theme.h"
#include "observer_peer.h"
#include "chat_helpers/stickers.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "window/notifications_manager.h"
#include "window/window_session_controller.h"
#include "window/window_peer_menu.h"
@ -250,7 +250,7 @@ InnerWidget::InnerWidget(
setupShortcuts();
}
AuthSession &InnerWidget::session() const {
Main::Session &InnerWidget::session() const {
return _controller->session();
}

View File

@ -13,7 +13,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/rp_widget.h"
#include "base/flags.h"
class AuthSession;
namespace Main {
class Session;
} // namespace Main
namespace Ui {
class IconButton;
@ -163,7 +165,7 @@ private:
NextOrOriginal,
};
AuthSession &session() const;
Main::Session &session() const;
void dialogRowReplaced(Row *oldRow, Row *newRow);

View File

@ -13,7 +13,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_chat.h"
#include "data/data_user.h"
#include "observer_peer.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
namespace Dialogs {

View File

@ -21,7 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "lang/lang_keys.h"
#include "mainwindow.h"
#include "mainwidget.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
#include "core/application.h"
#include "core/event_filter.h"

View File

@ -13,7 +13,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "dialogs/dialogs_key.h"
#include "ui/special_buttons.h"
class AuthSession;
namespace Main {
class Session;
} // namespace Main
namespace HistoryView {
class TopBarWidget;

View File

@ -17,7 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "storage/localstorage.h"
#include "core/file_utilities.h"
#include "platform/platform_info.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "data/data_session.h"
#include "base/unixtime.h"
#include "styles/style_export.h"

View File

@ -24,7 +24,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/file_utilities.h"
#include "boxes/calendar_box.h"
#include "base/unixtime.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "styles/style_widgets.h"
#include "styles/style_export.h"
#include "styles/style_boxes.h"

View File

@ -20,7 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "mainwindow.h"
#include "mainwidget.h"
#include "apiwrap.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "boxes/confirm_box.h"
#include "boxes/url_auth_box.h"
#include "window/layer_widget.h"

View File

@ -28,7 +28,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "apiwrap.h"
#include "layout.h"
#include "window/window_session_controller.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "ui/widgets/popup_menu.h"
#include "ui/image/image.h"
#include "ui/text/text_utilities.h"
@ -277,7 +277,7 @@ InnerWidget::InnerWidget(
requestAdmins();
}
AuthSession &InnerWidget::session() const {
Main::Session &InnerWidget::session() const {
return _controller->session();
}

View File

@ -16,7 +16,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "mtproto/sender.h"
#include "base/timer.h"
class AuthSession;
namespace Main {
class Session;
} // namespace Main
namespace HistoryView {
class Element;
@ -50,7 +52,7 @@ public:
not_null<Window::SessionController*> controller,
not_null<ChannelData*> channel);
AuthSession &session() const;
Main::Session &session() const;
base::Observable<void> showSearchSignal;
base::Observable<int> scrollToSignal;

View File

@ -22,7 +22,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/unixtime.h"
#include "core/application.h"
#include "mainwindow.h" // App::wnd()->sessionController
#include "auth_session.h"
#include "main/main_session.h"
namespace AdminLog {
namespace {

View File

@ -22,7 +22,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "mainwidget.h"
#include "mainwindow.h"
#include "observer_peer.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "window/notifications_manager.h"
#include "calls/calls_instance.h"
#include "storage/localstorage.h"

View File

@ -23,7 +23,10 @@ class HistoryItem;
class HistoryMessage;
class HistoryService;
class HistoryMedia;
class AuthSession;
namespace Main {
class Session;
} // namespace Main
namespace Data {
struct Draft;

View File

@ -38,7 +38,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "mainwindow.h"
#include "mainwidget.h"
#include "layout.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "core/application.h"
#include "apiwrap.h"
#include "platform/platform_info.h"
@ -185,7 +185,7 @@ HistoryInner::HistoryInner(
}, lifetime());
}
AuthSession &HistoryInner::session() const {
Main::Session &HistoryInner::session() const {
return _controller->session();
}

View File

@ -52,7 +52,7 @@ public:
Ui::ScrollArea *scroll,
not_null<History*> history);
AuthSession &session() const;
Main::Session &session() const;
void messagesReceived(PeerData *peer, const QVector<MTPMessage> &messages);
void messagesReceivedDown(PeerData *peer, const QVector<MTPMessage> &messages);

View File

@ -24,7 +24,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "storage/storage_facade.h"
#include "storage/storage_shared_media.h"
//#include "storage/storage_feed_messages.h" // #feed
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
#include "media/audio/media_audio.h"
#include "core/application.h"

View File

@ -23,7 +23,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_session.h"
#include "data/data_user.h"
#include "data/data_file_origin.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "styles/style_widgets.h"
#include "styles/style_history.h"
#include "window/window_session_controller.h"

View File

@ -17,7 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "history/history_service.h"
#include "history/view/history_view_service_message.h"
#include "history/view/history_view_context_menu.h" // For CopyPostLink().
#include "auth_session.h"
#include "main/main_session.h"
#include "boxes/share_box.h"
#include "boxes/confirm_box.h"
#include "ui/toast/toast.h"

View File

@ -9,7 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "lang/lang_keys.h"
#include "mainwidget.h"
#include "auth_session.h"
#include "main/main_session.h"
#include "apiwrap.h"
#include "layout.h"
#include "history/history.h"

Some files were not shown because too many files have changed in this diff Show More