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

Use EditPeerInfoBox for editing groups.

This allows to edit group invite links.
Rename EditNameTitleBox to EditNameBox, used only from Settings.
This commit is contained in:
John Preston
2017-12-02 16:04:22 +04:00
parent da77c10f60
commit 8391d43057
8 changed files with 245 additions and 171 deletions

View File

@@ -198,11 +198,9 @@ private:
};
class EditNameTitleBox : public BoxContent, public RPCSender {
Q_OBJECT
class EditNameBox : public BoxContent, public RPCSender {
public:
EditNameTitleBox(QWidget*, not_null<PeerData*> peer);
EditNameBox(QWidget*, not_null<UserData*> user);
protected:
void setInnerFocus() override;
@@ -210,18 +208,13 @@ protected:
void resizeEvent(QResizeEvent *e) override;
private slots:
void onSave();
void onSubmit();
private:
void onSaveSelfDone(const MTPUser &user);
bool onSaveSelfFail(const RPCError &error);
void submit();
void save();
void saveSelfDone(const MTPUser &user);
bool saveSelfFail(const RPCError &error);
void onSaveChatDone(const MTPUpdates &updates);
bool onSaveChatFail(const RPCError &e);
not_null<PeerData*> _peer;
not_null<UserData*> _user;
object_ptr<Ui::InputField> _first;
object_ptr<Ui::InputField> _last;