mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Remove EditChannelBox.
This commit is contained in:
@@ -205,62 +205,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
class EditChannelBox : public BoxContent, public RPCSender {
|
||||
public:
|
||||
EditChannelBox(QWidget*, not_null<ChannelData*> channel);
|
||||
|
||||
protected:
|
||||
void prepare() override;
|
||||
void setInnerFocus() override;
|
||||
|
||||
void keyPressEvent(QKeyEvent *e) override;
|
||||
void resizeEvent(QResizeEvent *e) override;
|
||||
void paintEvent(QPaintEvent *e) override;
|
||||
|
||||
private:
|
||||
void updateMaxHeight();
|
||||
bool canEditSignatures() const;
|
||||
bool canEditInvites() const;
|
||||
void handleChannelNameChange();
|
||||
void descriptionResized();
|
||||
void setupPublicLink();
|
||||
void save();
|
||||
|
||||
void onSaveTitleDone(const MTPUpdates &result);
|
||||
void onSaveDescriptionDone(const MTPBool &result);
|
||||
void onSaveSignDone(const MTPUpdates &result);
|
||||
void onSaveInvitesDone(const MTPUpdates &result);
|
||||
bool onSaveFail(const RPCError &error, mtpRequestId req);
|
||||
|
||||
void saveDescription();
|
||||
void saveSign();
|
||||
void saveInvites();
|
||||
|
||||
not_null<ChannelData*> _channel;
|
||||
|
||||
object_ptr<Ui::InputField> _title;
|
||||
object_ptr<Ui::InputField> _description;
|
||||
object_ptr<Ui::Checkbox> _sign;
|
||||
|
||||
enum class Invites {
|
||||
Everybody,
|
||||
OnlyAdmins,
|
||||
};
|
||||
std::shared_ptr<Ui::RadioenumGroup<Invites>> _inviteGroup;
|
||||
object_ptr<Ui::Radioenum<Invites>> _inviteEverybody;
|
||||
object_ptr<Ui::Radioenum<Invites>> _inviteOnlyAdmins;
|
||||
|
||||
object_ptr<Ui::LinkButton> _publicLink;
|
||||
|
||||
mtpRequestId _saveTitleRequestId = 0;
|
||||
mtpRequestId _saveDescriptionRequestId = 0;
|
||||
mtpRequestId _saveSignRequestId = 0;
|
||||
mtpRequestId _saveInvitesRequestId = 0;
|
||||
|
||||
QString _sentTitle, _sentDescription;
|
||||
|
||||
};
|
||||
|
||||
class RevokePublicLinkBox : public BoxContent, public RPCSender {
|
||||
public:
|
||||
RevokePublicLinkBox(QWidget*, Fn<void()> revokeCallback);
|
||||
|
Reference in New Issue
Block a user