mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Remove some calls to Auth().
This commit is contained in:
@@ -13,6 +13,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
class ConfirmBox;
|
||||
class PeerListBox;
|
||||
class AuthSession;
|
||||
|
||||
constexpr auto kMaxBioLength = 70;
|
||||
|
||||
@@ -43,10 +44,15 @@ void ShowAddParticipantsError(
|
||||
not_null<PeerData*> chat,
|
||||
const std::vector<not_null<UserData*>> &users);
|
||||
|
||||
class AddContactBox : public BoxContent, public RPCSender {
|
||||
class AddContactBox : public BoxContent {
|
||||
public:
|
||||
AddContactBox(QWidget*, QString fname = QString(), QString lname = QString(), QString phone = QString());
|
||||
AddContactBox(QWidget*, UserData *user);
|
||||
AddContactBox(QWidget*, not_null<AuthSession*> session);
|
||||
AddContactBox(
|
||||
QWidget*,
|
||||
not_null<AuthSession*> session,
|
||||
QString fname,
|
||||
QString lname,
|
||||
QString phone);
|
||||
|
||||
protected:
|
||||
void prepare() override;
|
||||
@@ -61,12 +67,9 @@ private:
|
||||
void retry();
|
||||
void save();
|
||||
void updateButtons();
|
||||
void onImportDone(const MTPcontacts_ImportedContacts &res);
|
||||
void importDone(const MTPcontacts_ImportedContacts &result);
|
||||
|
||||
void onSaveUserDone(const MTPcontacts_ImportedContacts &res);
|
||||
bool onSaveUserFail(const RPCError &e);
|
||||
|
||||
UserData *_user = nullptr;
|
||||
const not_null<AuthSession*> _session;
|
||||
|
||||
object_ptr<Ui::InputField> _first;
|
||||
object_ptr<Ui::InputField> _last;
|
||||
@@ -91,6 +94,7 @@ public:
|
||||
};
|
||||
GroupInfoBox(
|
||||
QWidget*,
|
||||
not_null<AuthSession*> session,
|
||||
Type type,
|
||||
const QString &title = QString(),
|
||||
Fn<void(not_null<ChannelData*>)> channelDone = nullptr);
|
||||
@@ -110,6 +114,8 @@ private:
|
||||
void descriptionResized();
|
||||
void updateMaxHeight();
|
||||
|
||||
const not_null<AuthSession*> _session;
|
||||
|
||||
Type _type = Type::Group;
|
||||
QString _initialTitle;
|
||||
Fn<void(not_null<ChannelData*>)> _channelDone;
|
||||
@@ -126,7 +132,10 @@ private:
|
||||
|
||||
class SetupChannelBox : public BoxContent, public RPCSender {
|
||||
public:
|
||||
SetupChannelBox(QWidget*, ChannelData *channel, bool existing = false);
|
||||
SetupChannelBox(
|
||||
QWidget*,
|
||||
not_null<ChannelData*> channel,
|
||||
bool existing = false);
|
||||
|
||||
void setInnerFocus() override;
|
||||
|
||||
@@ -162,7 +171,8 @@ private:
|
||||
|
||||
void showRevokePublicLinkBoxForEdit();
|
||||
|
||||
ChannelData *_channel = nullptr;
|
||||
const not_null<ChannelData*> _channel;
|
||||
|
||||
bool _existing = false;
|
||||
|
||||
std::shared_ptr<Ui::RadioenumGroup<Privacy>> _privacyGroup;
|
||||
@@ -215,7 +225,10 @@ private:
|
||||
|
||||
class RevokePublicLinkBox : public BoxContent, public RPCSender {
|
||||
public:
|
||||
RevokePublicLinkBox(QWidget*, Fn<void()> revokeCallback);
|
||||
RevokePublicLinkBox(
|
||||
QWidget*,
|
||||
not_null<AuthSession*> session,
|
||||
Fn<void()> revokeCallback);
|
||||
|
||||
protected:
|
||||
void prepare() override;
|
||||
@@ -223,6 +236,8 @@ protected:
|
||||
void resizeEvent(QResizeEvent *e) override;
|
||||
|
||||
private:
|
||||
const not_null<AuthSession*> _session;
|
||||
|
||||
object_ptr<Ui::FlatLabel> _aboutRevoke;
|
||||
|
||||
class Inner;
|
||||
|
Reference in New Issue
Block a user