2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

broadcast channels support started

This commit is contained in:
John Preston
2015-09-06 13:17:09 +03:00
parent 95ff7821a3
commit b53e35e046
31 changed files with 1006 additions and 525 deletions

View File

@@ -55,7 +55,7 @@ public:
void changeCheckState(DialogRow *row);
void changeCheckState(ContactData *data, PeerData *peer);
void peopleReceived(const QString &query, const QVector<MTPContactFound> &people);
void peopleReceived(const QString &query, const QVector<MTPPeer> &people);
void refresh();
@@ -116,7 +116,7 @@ private:
bool _searching;
QString _lastQuery;
typedef QVector<UserData*> ByUsernameRows;
typedef QVector<PeerData*> ByUsernameRows;
typedef QVector<ContactData*> ByUsernameDatas;
ByUsernameRows _byUsername, _byUsernameFiltered;
ByUsernameDatas d_byUsername, d_byUsernameFiltered; // filtered is partly subset of d_byUsername, partly subset of _byUsernameDatas
@@ -146,6 +146,7 @@ public slots:
void onScroll();
void onAdd();
void onCreateChannel();
void onInvite();
void onNext();
@@ -163,7 +164,7 @@ private:
void init();
ContactsInner _inner;
FlatButton _addContact;
FlatButton _addContact, _createChannel;
FlatInput _filter;
FlatButton _next, _cancel;
@@ -171,6 +172,8 @@ private:
void peopleReceived(const MTPcontacts_Found &result, mtpRequestId req);
bool peopleFailed(const RPCError &error, mtpRequestId req);
bool _creatingChannel;
QTimer _searchTimer;
QString _peopleQuery;
bool _peopleFull;
@@ -188,7 +191,7 @@ class CreateGroupBox : public AbstractBox, public RPCSender {
public:
CreateGroupBox(const MTPVector<MTPInputUser> &users);
CreateGroupBox(const MTPVector<MTPInputUser> &users, bool creatingChannel);
void keyPressEvent(QKeyEvent *e);
void paintEvent(QPaintEvent *e);
void resizeEvent(QResizeEvent *e);
@@ -209,6 +212,7 @@ private:
bool failed(const RPCError &e);
MTPVector<MTPInputUser> _users;
bool _creatingChannel;
int32 _createRequestId;